+ 1
Can anyone tell me the mistake in this c++ program? It says something about the boolean and the & operator
In c++ trying to make a program to pass a new course but it says an error #include <iostream> using namespace std; int main() { bool mathematics ; bool language ; if((mathematics = 0) || (language = 0) ){ cout<<"pass";} else if( (mathematics = 0) & & (language = 0) ){ cout << "failed"; } return 0; }
4 ответов
+ 3
here's the corrected version I made some changes.
https://code.sololearn.com/c7OJzud1QHlS/?ref=app
+ 4
1.You didn't assign any value to the variables
2.You wrote & & instead of &&
3.You wrote = (asignment) instead of ==
+ 1
The answer's Sreejith is a good correction! 🙂
0
thank you very much 😊