+ 1
Whats wrong?
can anyone explain the error ? https://code.sololearn.com/ch1Y7Xf97kCK/?ref=app
7 Antworten
+ 3
Jaafer Hazim This is the working logic, you can modify it the way you like.
cout << "type even numbers from 0 to 6\n";
int isCorrect;
int j[3], k[3] = {2, 4, 6};
for(int i=0; i<3; i++) {
cin >> j[i];
if (j[i] == k[i])
isCorrect++;
}
if(isCorrect == 3)
cout << "Correct";
else
cout << "Wrong";
+ 1
Try to input every single element instead of the array.
+ 1
Jaafer Hazim Remove "}" at the end of the IF => if(condition) {
I'm sorry my phone put it by mistake. My mistake. Try with Dev' suggestion
+ 1
Dev thanks alot❤👌. you made me understand the logic😍👍
0
Jaafer Hazim Remember that at the end of each line you must put ";"
0
Luciano Ariel Caputi i added them.. still doesnt work as expected🤔
0
Luciano Ariel Caputi thanks for ur help anyways❤