0

Help me to complete this converter

I am making days to second converter, all the codes are also correct, so why is it not working? Please help me with this 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 int hours = days*24; int minutes = hours*60; int seconds = minutes*60; System.out.println(seconds); } }

3rd Mar 2021, 6:23 PM
Vikas Jasratiya
Vikas Jasratiya - avatar
6 Answers
+ 1
I think you are missing import import java.util.Scanner; Vikas Jasratiya https://code.sololearn.com/cYPY5WxmPtdj/?ref=app
3rd Mar 2021, 6:38 PM
Sharique Khan
Sharique Khan - avatar
+ 1
you have to give an input which will be a number (a numbe of days) Vikas Jasratiya
3rd Mar 2021, 6:44 PM
Sharique Khan
Sharique Khan - avatar
+ 1
Happy to help đŸ€ŸđŸ» Vikas Jasratiya
3rd Mar 2021, 6:46 PM
Sharique Khan
Sharique Khan - avatar
0
Actually,I have started learning Java language from today itself, so when I run this code, it says that your program needs input. I don't know what to write there.
3rd Mar 2021, 6:41 PM
Vikas Jasratiya
Vikas Jasratiya - avatar
0
Ha thanks, now the output is coming
3rd Mar 2021, 6:46 PM
Vikas Jasratiya
Vikas Jasratiya - avatar