13th Apr 2018, 2:41 PM
Jaafer Hazim
Jaafer Hazim - avatar
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";
13th Apr 2018, 2:56 PM
Dev
Dev - avatar
+ 1
Try to input every single element instead of the array.
13th Apr 2018, 2:56 PM
Timon Paßlick
+ 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
13th Apr 2018, 2:56 PM
Luciano Ariel Caputi
Luciano Ariel Caputi - avatar
+ 1
Dev thanks alot❤👌. you made me understand the logic😍👍
13th Apr 2018, 3:02 PM
Jaafer Hazim
Jaafer Hazim - avatar
0
Jaafer Hazim Remember that at the end of each line you must put ";"
13th Apr 2018, 2:50 PM
Luciano Ariel Caputi
Luciano Ariel Caputi - avatar
0
Luciano Ariel Caputi i added them.. still doesnt work as expected🤔
13th Apr 2018, 2:52 PM
Jaafer Hazim
Jaafer Hazim - avatar
0
Luciano Ariel Caputi thanks for ur help anyways❤
13th Apr 2018, 3:01 PM
Jaafer Hazim
Jaafer Hazim - avatar