3.6. (Part 1) Time Calculator - Java

in #coding10 years ago

Starting out with Java: From control structures through objects

Chapter 3

Programming Challenges

6. Time Calculator

Write a program that asks the user to enter a number of seconds. 

•  There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds.

•  There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours in that many seconds. 

•  There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days in that many seconds.

Gaddis, Tony (2015-05-29). Starting Out with Java: From Control Structures through Objects (Page 185 & 186). Pearson Education. 

Kindle Edition. 

Happy Steeming Everyone!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.079
BTC 61335.03
ETH 1628.31
USDT 1.00
SBD 0.41