Guest User

Untitled

a guest
Jan 13th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. double cas = 3661.23;
  2.  
  3. int hh = (int)(cas / 3600);
  4. cas -= (hh * 3600);
  5. int mm = (int)(cas / 60);
  6. cas -= (mm * 60);
  7. int ss = (int) cas;
  8. cas -= ss;
  9. int ms = (int)(cas * 1000);
  10.  
  11. System.out.println(hh + ":" + mm + ":" + ss + "." + ms);
Add Comment
Please, Sign In to add comment