22. Make a program that will input minutes and convert it into seconds. Your program will be terminated when you input zero in the minutes.
#include <iostream>
using namespace std;
int main() {
while (true) {
int i;
cout << "Enter minutes:";
cin >> i;
if (i == 0) return 1;
cout << i << " minutes is same as: " << 60 * i << " seconds"<<endl;
}
return 0;
}
Comments
Leave a comment