-
new to c++ need help
HI All
I have just started to learn c++ from the tutorials on this website and have got a problem with the following code it carry's on returning the error EXPECTED PRIMARY FUNCTION BEFORE ELSE please help!
Code:
#include <iostream>
using namespace std;
int main()
{
cout<<"WHAT IS YOUR AGE ? ";
int age;
cin>>age;
cin.get();
cout<<"\nWHAT IS YOUR WIFE'S AGE ? ";
int age2;
cin>>age2;
cin.get();
if (age+age2>50);
{
cout<<"\nYOUR COMBINED AGE IS GREATER THEN 50";
cin.get();
}
else
{
cout<<"\n YOUR COMBINED AGE IS LESS THEN 50 ";
cin.get();
}
}
-
Oops. As tempting as it is to have something where you would expect "then", you have to leave that spot completely blank.
-
Your a lifesaver tabstop thanks alot man
-