line 72: Error: "}" expected instead of EOF. (last line of code, no matter what it may be)
The code I have is:
Expand|Select|Wrap|Line Numbers
- #include <iostream.h>
- #include <iomanip.h>
- #include <math.h>
- using namespace std;
- void PrintTime ( int number, int finalmin, int finalsec );
- void PrintSong ( int number, int secs, int minutes );
- int main ()
- {
- int number;
- int minute;
- int minutes;
- int sec;
- int secs;
- int finalmin;
- int finalsec;
- minutes = 0;
- secs = 0;
- cout << "Enter track number: " << endl;
- cin >> number;
- if (number <= 0)
- {
- cout << "Number should be positive. Exiting." << endl;
- return 1;
- }
- while (number >= 0)
- {
- if (number > 0)
- {
- cout <<
- "Enter the length of song, first minutes and then seconds" << endl << endl;
- cout << "Minutes: " << endl;
- cin >> minute;
- cout << "Seconds: " << endl;
- cin >> sec;
- PrintSong ( number, minutes, secs );
- finalmin = (minutes + minute);
- finalsec = (secs + sec);
- }
- else
- {
- cout << "Invalid number. exiting.";
- return 1;
- return 1;
- }
- return 0;
- }
- void PrintTime ( int number, int finalmin, int finalsec );
- {
- cout << "There is a total of "
- << finalmin << " minute, and "
- << finalsec << " seconds." << "./n";
- }
- void PrintSong ( int number, int minutes, int secs );
- {
- cout << "Track number " << number << " is " << minutes << " minutes and "
- << secs << " seconds long." << "./n";
- }
I'm not sure if the code is right, but I have been trying to get rid of that one error for hours and no matter what I do it gives the same error.
Any help is appreciated! thanks