Hey All:

I am new to the C++ board. I need a simple answer to what I am sure is a simple problem.

Problem:

-I have spent all evening writing a program to convert 24-hour notation to 12-hour notation. There are two problems I have run into and simply can't find a clear answer in the text.

1. How can I format the minutes so that when I ask someone to enter say 5 minutes it comes out with a leading zero ala 05.
This way my cout statement produces a time of say 12:05 instead of 12:5. This is really the only trouble I am having and would complete my program...PLEASE HELP!

2. I would like to also insert am, pm, noon, midnight for certain times. How can I do this with out several if-else statements...or is that the only way??

Thansk,

Jarod.