Write a program which asks the user for four numbers and then tells them one of the following:· That there were more even numbers than odd numbers· That there were more odd numbers than even numbers· That there were the same number of even and odd
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/02 22:28:20
Write a program which asks the user for four numbers and then tells them one of the following:· That there were more even numbers than odd numbers· That there were more odd numbers than even numbers· That there were the same number of even and odd
Write a program which asks the user for four numbers and then tells them one of the following:
· That there were more even numbers than odd numbers
· That there were more odd numbers than even numbers
· That there were the same number of even and odd numbers
Write a program which asks the user for four numbers and then tells them one of the following:· That there were more even numbers than odd numbers· That there were more odd numbers than even numbers· That there were the same number of even and odd
#include
void main(void)
{
int n,number[4],even,odd;
even=odd=0;
printf("please input 4 interger numbers:\n");
for(n=0;n