hello, i am relatively new to c++ and programming in general and my professor is very vague and often gets side tracked during lecture so i dont really learn anything in class. i have to resort to the internet for answers. my professor gave us an assignment to create a program that converts seconds into units of days hours minutes and seconds. he wants the output to be:
" the equivalent time for 121 seconds is:
2 minutes
1 second"
but my output prints
"the equivalent time for 121 seconds is:
0 days
0 hours
2 minutes
1 seconds"
my question is how do i produce my output so that it doesnt show the value if it equals 0. and also i would prefer my value to be singular when the answer is 1. for example "1 hour" instead of "1 hours"