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
sharkquik (0)

@abc3354 Thanks for your help! I changed the print format to {:02d} and did the modulo that you suggested. It works.