I was working on a program for school and I corrected the errors that Visual Studio, but the program doesn't do anything. I've struggled with loops and I think that's where the problem lies. Can anyone assist me with what I've done wrong? I've included the assignment instructions and the actual program I wrote.


Instructions:

Create and run a program that includes a main and a function. The function name should be convert_to_secs. the function receives an integer representing seconds, an integer representing minutes and an integer representing hours. The function determines the total number of seconds and returns the results to the caller.

The main program should have a loop to perform conversion 3 times ( loop to be performed 3 times ). Inside the loop :

1. prompt the user for seconds, minutes and hours.

2. call the function to perform conversion.

3. inform the user of the result.

Run the program. Provide your own data.

Copy the output from the output window and imbed at the bottom of the program before submitting.

Student Response: ******I worked on this program and I got the errors cleared but I messed up somewhere as the program didn't work. Here is what I have.**********
Code:
#include <iostream> // Robert Sutherland CPT 234 Test 3
using namespace std; 

int convert_to_secs(int minutes, int hours);

int main()

{
int convert_to_secs(int minutes, int hours);

int seconds;

while (seconds > 60)
{
int seconds;
int minutes;
int hours;
int total_converted_minutes;
int total_converted_hours;

cout << "Please enter in a number of seconds: ";
cin >> seconds;
cout << "Please enter in a number for minutes: ";
cin >> minutes;
cout << "Please enter in a number for hours: ";
cin >> hours;

int convert_to_secs(int minutes, int hours);

if(seconds >= 61)


cout << "The number of seconds is " << seconds;

return 0;



if (minutes > 1)


int total_converted_minutes;

cout << minutes << " eqaul " << total_converted_minutes << " seconds ";

return 0;




if (hours > 0)

int total_converted_hours;

total_converted_hours= 3600*hours; //there are 3600 seconds in 1 hr

cout << hours << " equals " << total_converted_hours << " seconds ";

return 0;

}
}

int convert_to_secs(int minutes, int hours)
{
int total_converted_minutes;
int total_converted_hours;

total_converted_minutes= 60*minutes;

total_converted_hours= 3600*hours;

return 0;
}