+ 1

Write a program that checks if the water is boiling. Take the integer temperature in Celsius as input and output "Boiling" if t

29th May 2021, 1:12 PM
Siddhartha Kushwaha
Siddhartha Kushwaha - avatar
12 odpowiedzi
+ 3
NEZ How long did that take you?😂
30th May 2021, 7:15 AM
Vachila64☕
Vachila64☕ - avatar
+ 3
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 >=99) { System.out.println("Boiling"); } else if (temp >=250) { System.out.println("Boiling"); } else { System.out.println("Not Boiling"); } } }
23rd Mar 2023, 5:36 PM
Adebusola Adeyemi
Adebusola Adeyemi - avatar
+ 1
Siddhartha Kushwaha You have a few problems. You forgot a colon and your spacing is bad. Take a look at this. https://code.sololearn.com/cVpQgdU2N41z/?ref=app
29th May 2021, 1:51 PM
Brain & Bones
Brain & Bones - avatar
+ 1
in = int(input()) if in >= 100: print("boiling") else: print("not boiling")
31st May 2021, 7:15 AM
Akshat Sharma
+ 1
i want the perfect program in java
31st Jul 2023, 9:20 AM
Ratlavath Suresh
Ratlavath Suresh - avatar
+ 1
import java.util.Scanner; public class Program { public static void main(String[] args) { //your code goes here Scanner sc = new Scanner(System.in); int temperatureCelsius = sc.nextInt(); if (temperatureCelsius >= 100) { System.out.println("Boiling"); } else { System.out.println("Not boiling"); } } }
10th Sep 2023, 4:40 AM
SOLO SOLUTIONS
SOLO SOLUTIONS - avatar
0
Well, that should be relatively easy... In pseudo code 1| varialde temperature = input() 2| if temperature is greater than pr equal to 100 3| print "Boiling"
29th May 2021, 1:26 PM
Vachila64☕
Vachila64☕ - avatar
0
Have you tried writing it at all? I'm not good with python...
29th May 2021, 1:37 PM
Vachila64☕
Vachila64☕ - avatar
0
Yes tried hundred of times.
29th May 2021, 1:38 PM
Siddhartha Kushwaha
Siddhartha Kushwaha - avatar
0
Share your attempts, maybe I or somepne else could spot the error?
29th May 2021, 1:38 PM
Vachila64☕
Vachila64☕ - avatar
0
temp = int(input()) temp=100 if temp==100: print("boiling") else: if temp>=100 print("nothing")
29th May 2021, 1:42 PM
Siddhartha Kushwaha
Siddhartha Kushwaha - avatar
0
temp=int(input()) if(temp>=100): print("boiling")
12th Oct 2023, 1:13 PM
Nithya