New to coding, and don't fully understand this question.

I need help with this question, not fully sure how to do it. only new to C++.

Write a program to display all the hour and minute values in a 24-hour clock from 00:00 to 23:59

I have to write using loops and if statements.
I don't fully understand loops could I get a bit of help please.
Have a look at this tutorial - specially for loops.
http://www.cplusplus.com/doc/tutorial/control/
well, you are going to need 2 loops, one to count minutes (0..59) and one to count hours (0..23)

the loop that counts minutes needs to be repeated for each and every hour, so it will need to be nested inside the hours loop.

1
2
3
4
5
for all the hours in a day
   for all the minutes in an hour
      print the hour and minute
   next
next


In the link that thomas provided, just look for "The for loop", you dont need to look at other variations of the for loop, just the first basic one.

Thanks for the info guys.
Topic archived. No new replies allowed.