Write a program which take input any value in hour(s) and convert it into minutes.
example: 1 h = 60 mins
2 h = 120 mins
Input:
Output:
example: 1 h = 60 mins
2 h = 120 mins
Input:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <iostream.h> #include <conio.h> int main() { cout << "Hour(s) convert into minutes: Minutes = h * 60 \n"; int h, m, Minutes; cout << "Enter a Value in hour(s)?\n"; cin >> h; m = 60; Minutes = h * m; cout << h <<" = "<< Minutes << " mintues \n"; getch(); return 0; } |
Output:
Hours convert into minutes: Minutes = h * 60 Enter a Value in hour(s)? 4 4 = 240 minutes
No comments:
Post a Comment