Hi,
I have some problem with my programing and I could use some help.
I wonder why my else phrase does not work.
#include <iostream>
using namespace std;
int main ()
{
int number;
cout << " write a number" << endl;
cin >> number;
if (number < 10);
cout << " your number is lower then 10" << endl;
else
cout << " your number is over 10";
}
if (number < 10); ///error
if (number < 10) is correct
You have a semi colon at the end of your if, remove it.
if (number < 10);