Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SecToHours
package P; import java.io.PrintStream; import java.util.Scanner; public class SecToHours { PrintStream out; Scanner in; SecToHours() { out = new PrintStream(System.out); in = new Scanner(System.in); } void start() { out.print("Seconds:"); int totalSecs = in.nextInt(); int hours = totalSecs / 3600; int minutes = (totalSecs % 3600) / 60; int seconds = totalSecs % 60; out.printf("%02d:%02d:%02d", hours, minutes, seconds); } public static void main(String[] args) { new SecToHours().start(); } }
run
|
edit
|
history
|
help
0
else if statement
Minimo quadrato somma di cubi
palin
fizzbuzz
3e
Use of JS in Java (not my)
assignment 3
Three In A Row Solver
1(E)
Remove unbalanced parentheses in a given expression