0

This code to not running it is showing error why plzzz help me out

https://code.sololearn.com/cj3JZD4DX40G/?ref=app

8th Sep 2020, 6:18 PM
sankalp gupta
sankalp gupta - avatar
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
8th Sep 2020, 6:23 PM
Nilesh
Nilesh - avatar
+ 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!"); } } }
8th Sep 2020, 9:05 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar