作业帮 > 英语 > 作业

Write a program which asks the user for four numbers and the

来源:学生作业帮 编辑:拍题作业网作业帮 分类:英语作业 时间:2024/06/04 18:50:01
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
#include
void main(void)
{
int n,number[4],even,odd;
even=odd=0;
printf("please input 4 interger numbers:\n");
for(n=0;n
再问: 能排下版吗? 谢谢
再答: VC6标准代码模式,你可以自行调整,如需要解释我等下重新加上注释
再问: 我用的是python2.7. 直接复制好像不行。。
再答: 那我再发一下代码,增加了注释,自己看看能否用。可能平台不同,程序有所不同,具体python2.7怎么用我也不清楚。你这个发到C/C++了。 #include void main(void)//vc6平台通过,其他平台可能为main()即可 { int n,number[4],even,odd; even=odd=0; printf("please input 4 interger numbers:\n");//提示请输入4个整数 for(n=0;n