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.
1
Expert's answer
2011-12-22T11:46:42-0500
# 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(); }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment