Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
calc
import java.util.Calendar; class Rextester { public static void main(String args[]) { calc( have, need ); } public static void calc(int have, int need){ Calendar now = Calendar.getInstance(); int gio, phut, gioNow, phutNow; gio = need / have / 12 / 60; phut = (need / have / 12) % 60; gioNow = now.get(Calendar.HOUR_OF_DAY) % 12 ; if(gioNow < 7) gioNow = gioNow + 5; else gioNow = gioNow - 7; phutNow = now.get(Calendar.MINUTE); System.out.println("Cần: " + gio + " giờ, " + phut + " phút"); System.out.println("Xong: " + (gioNow + gio) + " giờ, " + (phutNow + phut) + " phút"); } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
java palindrome check
karyawan
1.5
Matcher Example (not my)
JAVA # 20 RASTGELE SAYIDAN EN KÜÇÜĞÜNÜ BULMAK
Word Destructor
classwork
3f
3.E
has a
stackse - search stackoverflow differently
Please log in to post a comment.