作业帮 > 综合 > 作业

c++设计程序,这个怎么编程怎么搞啊,

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/23 11:15:45
c++设计程序,这个怎么编程怎么搞啊,
write a program to determine whether a given number is 'odd' or 'even' and print the message
NUMBER IS EVEN
or
NUMBER IS ODD
You can ueing else option or without it
输入描述
read an integer number form keyboard
输出描述
if the number read is odd number,print the message
NUMBER IS ODD
on the screen
if the number read is even number,print the message
NUMBER IS EVEN
on the screen
输入样例
12345
1234
输出样例
NUMBER IS ODD
NUMBER IS EVEN
#include
using namespace std;
int main()
{
int n;
while(cin>>n)
{
if(n%2!=0){
cout