0

I can't find out what's wrong it just keeps saying else without if statement even though there is one pls help

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

19th Feb 2023, 4:10 AM
david james
david james - avatar
4 odpowiedzi
+ 4
Read errors try to fixout import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int temp = sc.nextInt(); if(temp >= 100) {System.out.println("Boiling"); } else{ System.out.println("Not boiling"); } } }
19th Feb 2023, 4:13 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 4
Also you have added semicolon after if condition . taking input it must be nextInt not nextLnt
19th Feb 2023, 4:28 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Thanks, apparently a space was needed
19th Feb 2023, 4:24 AM
david james
david james - avatar
0
I think the L was a miss click thank you for your input though
19th Feb 2023, 4:29 AM
david james
david james - avatar