0
is it right?
import java.util.Scanner; class Myclass{ public static void Main(String [] args){ Scanner dog = new Scanner(System.in); System.out.println("Type ur age,u will get a discount if u are under 18!"); int age = dog.nextInt(); if (age < 18){System.out.println("congrats,u get the discount!"); } } }
3 odpowiedzi
+ 16
Hy ButterflyKnives YT
Java Code-playground is working correct ☺
● notice your main() method again
//replace "Main" by "main" 👍
+ 3
Do it run well?
+ 1
ShortCode time limit exceed :)