63 151
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #5763 in C++ for Aysha salem

Question #5763
Write a C++ program that prompt the user to input a positive integer. The program should then output the number and a message saying whether the number is even or odd.
Expert's answer
# include<iostream.h>
# include<conio.h>

void main(){
int topic;
printf("enter the number to find odd or even: ");
scanf("%d",&topic);
if (topic%2==0) printf("the number is even\n");
else printf("the number is odd\n");
getch();
}

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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions