c++设计程序,这个怎么编程怎么搞啊,write a program to determine whether a given number is 'odd' or 'even' and print the messageNUMBER IS EVENorNUMBER IS ODDYou can ueing else option or without it输入描述read an integer number form key
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/03 17:52:39
c++设计程序,这个怎么编程怎么搞啊,write a program to determine whether a given number is 'odd' or 'even' and print the messageNUMBER IS EVENorNUMBER IS ODDYou can ueing else option or without it输入描述read an integer number form key
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
c++设计程序,这个怎么编程怎么搞啊,write a program to determine whether a given number is 'odd' or 'even' and print the messageNUMBER IS EVENorNUMBER IS ODDYou can ueing else option or without it输入描述read an integer number form key
#include
using namespace std;
int main()
{
int n;
while(cin>>n)
{
if(n%2!=0){
cout