Ok am so green to C++ it's scary! So please bear with me. I keep getting this error when I compile the code and it reads
It's real simple and to me it looks like it should work.Quote:
parse error before `else'
Code:#include <iostream.h>
int main()
{
int varNumber; //variable to place number in??
cout<<"Please enter any number: "; //get input from user??
cin>>varNumber; //place input from user into the varible??
if(varNumber==8);
{
cout << "Right" <<endl;
}
else
{
cout << "wrong" endl;
}
return 0;
}