// minAndSec.cpp
// Converts a total number of seconds to minutes and seconds.

#include <iostream>

using namespace std;

int main()
{
   // Announce purpose of program:
   cout << "This program converts a total number of seconds "
               << "to minutes and seconds." << endl;

   // Input total number of seconds from user:
   cout << "Enter total number of seconds:>";
   int totalSeconds;      // to be input from user
   cin >> totalSeconds;

   // Compute minutes
   int minutes = totalSeconds / 60;

   // Compute seconds:
   int seconds = totalSeconds % 60;

   // Echo input, and output results:
   cout << totalSeconds << " seconds equals "
                    << minutes << " minutes and "
                    << seconds << " seconds." << endl;

   return 0;
}  // function main