0

what mean r=even(a) in this program

#include <iostream> #include <string.h> #include <conio.h> //write a program that input a number in main function //and pass to the function ,that function find //the number is Even or Odd //and return back to the main function. int even (int n); using namespace std; main() { int r, a; cin>>a; r=even(a); if(r==1) cout<<"even"<<a; else cout<<"Odd"<<a; } int even(int n) { if(n%2==0) { return 1; } else return 0; }

1st Feb 2020, 9:04 PM
abdullah
5 Respuestas
+ 1
thank you!
1st Feb 2020, 9:10 PM
abdullah
0
Is this code working? I don't think that it would be working
1st Feb 2020, 9:10 PM
★᭄ꦿ᭄ꦿနίԹʆαနʍմန
★᭄ꦿ᭄ꦿနίԹʆαနʍմန - avatar
0
offcourse its working
1st Feb 2020, 9:11 PM
abdullah
0
Edit main () to int main ()
1st Feb 2020, 9:12 PM
★᭄ꦿ᭄ꦿနίԹʆαနʍմန
★᭄ꦿ᭄ꦿနίԹʆαနʍմန - avatar
0
i know but its also works
1st Feb 2020, 9:12 PM
abdullah