+ 2
Boiling Water :- What am I missing here?
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int temp = sc.nextlnt(); if(temp>=100) { System.out.println("Boiling"); }else{ System.out.println("Not boiling"); } } }
4 Respostas
+ 2
Mirielle Wow! You have a really quick eye! 🛐😁
+ 1
Correct code
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int temp = sc.nextInt(); // Corrected method name
if(temp>=100) {
System.out.println("Boiling");
}else{
System.out.println("Not boiling");
}
}
}
0
int temp = sc.nextInt(); // Corrected method name
0
I guess Mirielle was removed from the platform with all their answers. :(