+ 2

Why is the C++ Even or not code returning 1?[SOLVED]

So i made a code; https://code.sololearn.com/c1VHNpSLyY5P/?ref=app When i Type 7, it should say “Not Even” but it returns 1 instead. What should i do? Edit: It’s solved.

28th Dec 2018, 4:49 AM
Potato Hacker
Potato Hacker - avatar
6 odpowiedzi
+ 2
Perfect! it returns just what i wanted, “Not Even”
28th Dec 2018, 5:00 AM
Potato Hacker
Potato Hacker - avatar
+ 1
No output.
28th Dec 2018, 4:55 AM
Potato Hacker
Potato Hacker - avatar
+ 1
it returns “1”
28th Dec 2018, 4:58 AM
Potato Hacker
Potato Hacker - avatar
0
int count;
28th Dec 2018, 4:54 AM
Calviղ
Calviղ - avatar
0
string evenOrNot(){
28th Dec 2018, 4:57 AM
Calviղ
Calviղ - avatar
0
cout << evenOrNot();
28th Dec 2018, 4:59 AM
Calviղ
Calviղ - avatar