unsigned int time,hour,mins,secs;
printf("enter time in secs");
printf("enter minutes and secs");
The above code will convert "seconds" entered into "hh:mm:ss" form and also if you enter time in "minutes and seconds" this code will convert it into "hh:mm:ss"
Try to implement it in your code
Hope this helped :)
Mark this thread as solved if your problem is solved "Keep coding".
I won't hand the whole answer to you, as that wouldn't be helping you in the long term.
As a starting point, how many minutes are there in every hour? You'll need to divide the number of minutes by that number (ensuring it's stored or cast as an integer so as to truncate any decimals) to get the number of hours. This'll be your HH
You could then use the modulo operator to find out how many minutes are left over at the end. That will become your MM