76 804
Assignments Done
Successfully Done
In June 2019

Answer to Question #15481 in C++ for Aadya

Question #15481
write a program to find whether a given number is even or odd.
Expert's answer

bool even(int i){
if (i%2==0) return true;
else return false;

int a;

void main(){
cout<<"Enter an integer: ";
if (even(a)) cout<<"Entered integer is even.\n";
else cout<<"Entered integer is odd.\n";

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions