Answer to Question #264904 in C++ for Rille

Question #264904

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.




1
Expert's answer
2021-11-16T18:38:16-0500
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS