0
I can't find out what's wrong it just keeps saying else without if statement even though there is one pls help
4 Antworten
+ 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");
}
}
}
+ 4
Also you have added semicolon after if condition . taking input it must be nextInt not nextLnt
0
Thanks, apparently a space was needed
0
I think the L was a miss click thank you for your input though