+ 6
Why this cord didn't work?
import java.util.Scanner ; class Program { public static void main(String[] args) { Scanner age = new Scanner (System.in) ; age.nextint (); if(age <= 0) { System.out.println("Error"); } else if(age <= 16) { System.out.println("Too Young"); } else if(age < 100) { System.out.println("Welcome!"); } else { System.out.println("Really?"); } } }
2 Answers
+ 5
it didn't show me anything.Supriya can you just copy the cord,instead of givning a link.
+ 4
I think it should be like this.....
scanner ag=new
scanner(system.in);
int age=ag.nextInt();
Am I right ?