Please don't try to mix colour and size tags with code tags. They don't work together.
Please format your code with indentation and correct
line lengths (look at line 27) and remove all the unnecessary empty lines. It is you who will have the most difficulty if an error occurs and poor formatting obscures it.
Why are you using 60 and 3600 in lines 17 and 19 after you declared those
consts? Why are you using 3600 in line 21 rather than DAY (which isn't 3600)? What does
remainMinutes mean? It doesn't seem to count anything in minutes. Inaccurate variable names is another good technique for confusing yourself.
Why do your
ifs not cover the entire range of values? What happens if you enter 50″? Your tests for the
ifs are also too complicated. This is what you want:-
or a different version
Consider changing
int to
unsigned int throughout because you won't be permitting negative values.
I shall leave the question in your second post as “an exercise for the reader”.