Posts
 
Reputation
Joined
Last Seen
Ranked #630
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #107.49K
~8K People Reached
Favorite Forums
Favorite Tags
c++ x 1
Member Avatar for rock9449

Some of the solutions posted here are not quite correct. Zero in 24 hour time is 12:00 AM. Try this: [code=c++] void convertTo12Hour(int hour24, int& hour12, char& ampm) { hour12 = hour24 % 12; if (hour12 == 0) hour12 = 12; ampm = (hour24 < 12) ? 'a' : 'p'; …

Member Avatar for deceptikon
0
8K