- 6
In java how can I convert 12 days into seconds
Any solution?
17 Answers
+ 2
int day =12, int h= 24, int min = 60, int sec =60
int dayTOsecond =day*h*min*sec
System. out. println(dayTOsecond)
Dont forget. ;
+ 2
int day =12;
int h= 24;
int min = 60;
int sec =60;
int dayTOsecond =day*h*min*sec
System. out. println(dayTOsecond);
+ 1
you can do it yourself ^^
0
12(days)*24(hours)*60(minutes)*60(seconds)
0
Yes but I want full coding
0
But why my result comes no output
0
did you print your result?
0
Print.ln ,yes
0
share your code to get more help ^^
0
Yes but don't laugh at my first problem
0
Wait wait wait how to share I am a newbie
0
make your code playground public
click the share icon (3 linked dots), choose to copy to clipboard and then paste here...
or
click the plus (+) icon in post textarea, choose insert code, and select your code (there is a menu where you could choose to display only yours)
0
class my class {
public static void main {(String [] arg)
int x = 12
int y = 24
System.out.println (x*y)
}
}
0
you're missing at least one opening curly bracket '{' after main function argument list ;)
0
See this one that I corrected is it now ok
0
you must also name your class with a valid identifier (no spaces) and end your lines with semi-colon ';'
https://code.sololearn.com/ceRczYLJcGaI/?ref=app
also I have added some indentation...
0
Thanks sir, can you clear my doubts if free?? Sir please..