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; }
5 Respuestas
+ 1
thank you!
0
Is this code working?
I don't think that it would be working
0
offcourse its working
0
Edit main () to int main ()
0
i know but its also works