c语言大作业小学生测验,小学生测验 面向小学1~2年级学生,随机选择两个整数进行四则运…...

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

我的代码: #include #include #include#include void main() { int num=0,add=0; int score[3]={10,7,5}; char str[20],str1[10][20]; printf("注意!!!小朋友们如果除法除不尽就把商输入\n"); while(1) { int a=0,b=0,d=0,c=0,k=0,i=0,j=-1,result; char sf[4]={'+','-','*','/'}; while(1) { a=rand()%51; b=rand()%51; d=rand()%4; switch(d) { case 0:c=a+b;break; case 1:c=a-b;break; case 2:c=a*b;break; case 3:c=a/b;break; } if(c>=0 && c<=50) { sprintf(str,"%d %c %d = \n",a,sf[d],b); strcpy(str1[num],str); if(num==0) break; j=-1; for(i=0; i=90)printf("\nSMART\n"); else if(add>=80)printf("\nGOOD\n"); else if(add>=70)printf("\nOK\n"); else if(add>=60)printf("\nPASS\n"); else printf("\nTRY AGAIN\n"); } 怎么运行错误啊

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值