Write a C++ program for the following scenario. John Rowe has asked you to write a program that obtains minutes and remaining seconds from an amount of time in seconds. For example, 500 seconds contains 8 minutes and 20 seconds. Perform appropriate desk-checking to verify the correctness of your program.
Hint: To get the remainder in C++ use the modulus operator (%). For example 8 % 2 = 0, 8 % 3 = 2.
Here is the Solution to the problem above:
using namespace std;
int main(int argc, char *argv)
cout<<"Enter an Integer for seconds: ";
minutes = enter_second / 60;
second = enter_second % 60;
cout<<"Your Answer is: "<<enter_second<<" seconds is "<<minutes<<" minutes and "<<second<<" seconds. "<<endl;