+ 3
Can someone show me how to solve this?
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. import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //your code goes here } }
8 Réponses
+ 2
** you need to calculate seconds for input days
** print the result.
If you ask how, still then 'You need to complete lessons.. ' it's there how to do with example...
Here you need just a simple output statement which prints output. Task will complete.
Hope now you can ! Renz Malayan Cole ?
+ 3
A day have 24hours
A hour has 60 mins
A minute has 60 seconds
what else you need?
+ 3
Jayakrishna🇮🇳 i already know that but just don't know how to write the code,
+ 2
Then you should first learn how to write code.
+ 2
int ans=days*24*3600;
because
day=24h
h=60 min
min=60 sic
0
Manav Roy ok got it thanks
0
Thank you all finally got the right code for the problem 😊