input time, increase the sec +1
sharkquik (0)

Hi, i'm trying to write a simple program without using the time function. The program will ask user for current time, then it will add 1 sec to the time and display the time. How to add the 1 sec and also add the change to minutes and hours? and without using if statements.

You are viewing a single comment. View All
Answered by abc3354 (111) [earned 5 cycles]
View Answer
abc3354 (111)

@sharkquik, with modulos you should have 00
try to divide the big number of second by 3600 and then to do modulo 24 to have the number of hours