0
This code to not running it is showing error why plzzz help me out
2 Respostas
+ 2
I don't why the heck is n line 27 you again wrote the main statement.
Just remove that it'll work fine
https://code.sololearn.com/cz6MumX8bQ15/?ref=app
Check this
+ 1
Remove line 27:
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner AgeScan = new
Scanner (System.in);
int age = AgeScan.nextInt();
if (age <= 0){
System.out.println ("Error");
} else if ( age <= 17){
System.out.println ("Too young");
} else if ( age >= 18 && age< 60 ){
System.out.println ("Welcome");
} else if ( age >= 60 && age < 90){
System.out.println ("Really?");
} else {
System.out.println ("congratulations!");
}
}
}