Hi to everyone.Can somebody help to : Write a program to display all the hour and minute values in a 24-hour clock from 00:00 to 23:59.
PulsarScript
0
Junior Poster
Recommended Answers
Jump to PostSounds like you just want to pad to 2 digits with 0 as the pad character:
cout << setw(2) << setfill('0') << hour << ':' << setw(2) << setfill('0') << minute;
All 3 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
PulsarScript
0
Junior Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.