Answer to Question #29354 in C++ for Asif Arko
How to code this problem in code block
Define the integer "EVEN" or "ODD"
1
2013-04-30T08:35:06-0400
#include <iostream>
void main(){
& int a;& // declare the variable for the number (integer)
& cout<<"enter a number: ";&
& cin>>a; // input number
& if (a%2==0) cout<<"EVEN";& // determine if the number is even or odd; output the result
& else cout<<"ODD";
}
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment