How to solve it....? Please explain.... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to solve it....? Please explain....

Time Converter: You need a program to convert days to seconds. The given code takes the amount of days as input. Complete the code to convert it to seconds and output the result. Sample Input: 12 Sample Output: 1036800 Explanation: 12 days are 12*24 = 288 hours, which are 288*60 = 17280 minutes, which are 17280*60 = 1036800 seconds. Here is my try: int a = 12; int b = 24; int c = 60; int sum1 = a * b; int sum2 = sum1 * c; int sum3 = sum2 * c; System.out.println(sum3);

2nd Aug 2021, 1:14 AM
Md Shihab Shahriar Rashu
Md Shihab Shahriar Rashu - avatar
1 Answer
2nd Aug 2021, 2:12 AM
Md Shihab Shahriar Rashu
Md Shihab Shahriar Rashu - avatar