0
Why does this java code give me an Timeout Exception.
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int temp = sc.nextInt(); sc.close(); int boiling = 100; if (temp > boiling) { System.out.println("Boiling"); } else { System.out.println("Not boiling"); } } }
3 Answers
+ 1
on Sololearn it works fine, try it again
+ 1
The above code is working fine.
You can try again
0
I can' t learn because I don' t have any heart so what I do?