What I\'m trying to do:
I\'m trying to convert a 4-digit military time into the standard 12 hour time format, with a colon and an added PM or AM wit
if (pm = true)
if (pm = false)
A single equal sign is an assignment. You want to do a comparison:
if (pm == true)
if (pm == false)
These could also be written more idiomatically as:
if (pm)
if (!pm)
That's the main problem. Another is your logic for setting pm. You only need a single if statement, with the line subtracting 1200 placed inside the pm = true block.
if (milTime < 1200)
{
pm = false;
}
else
{
pm = true;
milTime -= 1200;
}
There are a few other bugs that I'll leave to you. I trust these corrections will get you a bit further, at least.