PHP Code:#include <iostream>
#include <cstdlib>
#include <ctime>
#include <iomanip>
using namespace std;
int main() {
int grade;
int random1;
int random2;
int answer;
// Introduce Program
cout << "Math Tutor Menu " << endl;
cout << " " << endl;
cout << "1. First Grade " << endl;
cout << "2. Second Grade " << endl;
cout << "3. Third Grade " << endl;
cout << " " << endl;
// Get Grade
cout << " Enter your grade (1-3): ";
cin >> grade;
// Get Problem to solve
if (grade < 1 || grade > 3) {
cout << "Sorry you don't meet the requirments to use this program. " << endl;
} else if (grade == 1) {
random1 = rand() 9;
random2 = rand() 9;
cout << " " << random1 << endl;
cout << "+" << random2 << endl;
} else if (grade == 2) {
random1 = rand() 89 + 10;
random2 = rand() 89 + 10;
cout << " " << random1 << endl;
cout << "+" << random2 << endl;
} else {
random1 = rand() 899 + 100;
random2 = rand() 899 + 100;
cout << " " << random1 << endl;
cout << "+" << random2 << endl;
}//end if
return 0;
}//end main
Now I am far from done with this program, but I cant continue until it lets me do this part of it. So if anybody can help. It would be much appreciatedPHP Code:1>c:\documents and settings\my documents\visual studio 2008\projects\mathtutor\mathtutor\mathtutor.cpp(31) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\my documents\visual studio 2008\projects\mathtutor\mathtutor\mathtutor.cpp(32) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\my documents\visual studio 2008\projects\mathtutor\mathtutor\mathtutor.cpp(36) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\my documents\visual studio 2008\projects\mathtutor\mathtutor\mathtutor.cpp(37) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\my documents\visual studio 2008\projects\mathtutor\mathtutor\mathtutor.cpp(41) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\my documents\visual studio 2008\projects\mathtutor\mathtutor\mathtutor.cpp(42) : error C2143: syntax error : missing ';' before 'constant'




Reply With Quote