I know how to get it, basically. It's just for my program, it's 362 minutes. That is 6:02. The thing is it's ZERO two. I don't know how to get the zero and then the two?

Recommended Answers

All 3 Replies

We're not allowed to use iomanip or what you posted. I don't neccessarily mean this is the only example. Just in general, how do you turn minutes into hours:minutes form, including if it starts with a 0?

If minutes < 10
std::cout << "0"

???

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.