Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

Program To convert inputted time in minutes to Hours and minutes


Explanation
This is the program that user input time in minutes and the program convert it to hours and minutes. Here user input time in minutes and it resides in variable min using scanf. The inputted value is divide by 60(as 60 is equal to 1 hour) which yields integer value and discard value after decimal and put it into variable h, and then the same 'min' is now divided by 60 using modulus sign which yield remainder that become minutes and is now displayed using correct specifier in printf.



Output 
 
Share:

No comments:

Post a Comment

If you have any doubt, let me know...

Translate

Wikipedia

Search results