Answer to Question #263693 in C++ for Kashce

Question #263693

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-10T03:01:12-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 equal to " << 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