0
Below code is correct or wrong plz tell me ?
import java.util.Scanner; public class Program { public static void main(String[] args) { int days,hours,minutes,seconds; Scanner scanner = new Scanner(System.in); System.out.println(" days are"); days = scanner.nextInt(); hours= days*24; System.out.println(hours+"hours"); System.out.println("which are hours"); hours = scanner.nextInt(); minutes=hours*60; System.out.println(minutes+ "minutes"); System.out.println("which are minutes" ); minutes= scanner.nextInt(); seconds = minutes*60; System.out.println( seconds+ "seconds" ); } }
4 odpowiedzi
0
There not problem. All work correct. Yourself code need send on code in sololearn, but not in topic.
+ 2
This code compile and run properly other online compiler but if run solorun is not working
+ 1
What do you mean? Run it yourself. If it runs then it means that it doesn't have any errors. Also, without the question how to see if your answer is right or wrong?
+ 1
Aditya Prabhu
Sololearn supports inputs only once means you have to take all inputs together with new line like:
30
24
60