Advertisement
metallaro1980

SECONDS TO HOURS.MINUTES.SECONDS.

Jun 19th, 2014
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.45 KB | None | 0 0
  1. REM IT WORKS ONLY UNDER RFO BASIC! FOR ANDROID
  2. CLS
  3. INPUT "Tempo in secondi: ", tempo
  4. PRINT STR$(tempo) + "sec"
  5. IF tempo > 3600
  6.   ore = INT(tempo / 3600)
  7.   temporest = tempo - (ore * 3600)
  8.   min = INT(temporest / 60)
  9.   sec = tempo - ((ore * 3600) + (min * 60))
  10.   PRINT STR$(ore) + "h" + STR$(min) + "m" + STR$(sec) + "s"
  11. endif
  12.  
  13.  
  14. IF tempo < 3600
  15.   min = INT(tempo / 60)
  16.   sec = tempo - (min * 60)
  17.   PRINT STR$(min) + "m" + STR$(sec) + "s"
  18. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement