0
Whats wrong with this please? Looping a string input
hey, I keep getting time limit exceeded i just want to loop my scanner string 10Ă i cant see whats wrong with it String x; Scanner scan = new Scanner(System.in); x = scan.nextLine(); int a = 10; while(a>0); System.out.println(x);a--;
2 Answers
+ 1
When trying to figure out a problem with loops, try break; on the first try, then you can see your output instantly. This helps me a lot of error_logs
0
its ok i figured it out i needed to put the System.out.println inside {} đ