0
Nested if else
what is wrong the code? #include <iostream> using namespace std; int main() { int = dar; cin >> dar; if (dar >= 10) { if (dar == 15) { cout << "the number is magic" << endl; } cout << "the number is grater than 10" << endl; } else { cout << "the number is smaller than 10" << endl; } return 0; } thank you
3 Réponses
+ 9
Follow the error messages.
The problem exists in the line
int = dar;
+ 9
There is an additional "equal to" sign in below statement:
Int = dar;
Works for me otherwise:
https://code.sololearn.com/cnNc00Wy6Or1/?ref=app
+ 2
got it thank you :)