"Why don't you use a debugger?"
Of course I always use a debugger however when I run the code I posted above , it absolutely showed me no errors .
"And, please use code tags " +
"1) use code tags, to format your code properly and make it readable"
I do not know how to use them properly even after reading the link . Should I use them like this :
1 2 3 4 5 6 7 8 9 10 11 12 13
|
#include <iostream>
using namespace std;
int main()
{
int y ;
int x ;
....
system("pause");
}
|
??
"However, I'm not sure what you are trying to accomplish exactly with your program"
The user is asked to enter a number . If the user writes 5 , the console will output number is not valid . If the user writes 6 the console will output number is not valid . If the user writes a number that is not 5 or 6 , the console will output number is valid
The code you gave to me does not provide the wanted result.
"However, even if you remove the semicolon, can you think of any value of x for which the condition:
(x!=5 || x!=6) would not be true?"
yes : 6 or 5
with x == 5 or x == 6 , the condition is false
but why the question ?
my reply to konstance 44 was reported but I do not know why ? so why?
Many thanks to Texan 40 :)