小学生编程考试有哪些,小学生辅助考试系统100以内加减乘除 C语言编程
来源:整理 编辑:黑码技术 2023-09-19 17:11:41
本文目录一览
1,小学生辅助考试系统100以内加减乘除 C语言编程
if(i>=0) fraction = getInt(new StringBuffer(num).reverse().toString()); if(fraction.equals("0")) return ""; }
2,编程题小学生的请用QB语言中的FORNEXT语言编写
汗,不管怎么简单QB还降不到小学程度啊
首先在2位数中选择所以
for i=10 to 99
然后在next里把I变量的直变成字符型的
然后IF条件语句
语句里是left或mid函数取字符中第1个数+left或mid函数取字符中第2个数之和为5(记得取出的字符再1次转成数值型的),则输出该数
如果不是的话那就next如果你想知道我可以回答你具体的,可以加我微信号:lovehhqd 我是比较懂这方面的医载摆 
3,一道小学四年级编程题高手来
10
P(I)>60
C1=C1+1
S(C2)=P(I)
C2-1
S(I)10
P(I)>60
C1=C1+1
S(C2)=P(I)
C2-1
S(I)1.10
2. P(C1)>=60
3.C1=C1+1
4.S(C2)
5.C2-1
6.S(I)6个空的内容依次如下:
10
P(I)>60
C1=C1+1
S(C2)
C2-1
S(I)
填写以上空白之后的完整程序如下:
DATA 65,80,74,55,72,48,71,56,82,69
DIM p(10), s(10)
FOR i = 1 TO 10: READ p(i): NEXT
c1 = 1: c2 = 10
FOR i = 1 TO 10
IF p(i) > 60 THEN
s(c1) = p(i): c1 = c1 + 1
ELSE
s(c2) = p(i): c2 = c2 - 1
END IF
NEXT i
FOR i = 1 TO 10: PRINT s(i): NEXT i
程序执行的结果如下:
65
80
74
72
71
82
69
56
48
55
完全满足题目的要求,这样的题目你要多做,程序员、高级程序员考试就是这种题型。
4,C语言程序设计小学生测验
这位同学-.-要是你需要,我现在就帮你做...=.=. 给我半小时,帮你做他,但是前提你要在,不然我这么这么激情的做起来都没人鸟我-.- #include#include using namespace std; int score=0; void jisuan(int a,int b) { int count=1,sum,t,n; if((a+b)%2==0) { n=3; sum=a+b; cout<<"请计算:"<<<"+"<<<"="; while(n--) { cin>>t; if(t==sum) {if(count==1) score+=10; if(count==2) score+=7; if(count==3) score+=5; return ; } else { if(count!=3) cout<<"您的答案好像不对哦,请重新输入:"; else { cout<<"您已经错了三次.."< cout<<"正确答案是:"<< return ; } count++; } } } else { n=3; if(a { t=a; a=b; b=t; } sum=a-b; cout<<"请计算:"<<<"-"<<<"="; while(n--) { cin>>t; if(t==sum) {if(count==1) score+=10; if(count==2) score+=7; if(count==3) score+=5; return ; } else { if(count!=3) cout<<"您的答案好像不对哦,请重新输入:"; else { cout<<"您已经错了三次.."< cout<<"正确答案是:"<< return ; } count++; } } } } int main() { int n=10; int a,b,i,j,sum; while(n--) { srand((unsigned)time(null)); a=rand()%50; srand((unsigned)time(null)); b=rand()%49; while(1) { if(a+b<50) break; if(a>0) a--; if(b>0) b--; } jisuan(a,b); } cout<<"您的成绩为:"<< if(score>=90) cout<<"******************smart******************"; else if(score>=80&&score<90) cout<<"******************good******************"; else if(score>=70&&score<80) cout<<"*******************ok*******************"; else if(score>=60&&score<70) cout<<"******************pass******************"; else if(score>=60&&score<70) cout<<"************try again**************"; return 0; }
5,c语言小学生测验
#include#include#includeint main()srand(time(NULL));int a,b,c,score[10],trueValue,sum=0;for(int i=0;i<10;i++)for(a=rand()%51,b=rand()%51;a+b>50 || a+b50 || a-b<0; a=rand()%51,b=rand()%51)c=rand()%3;for(int j=0;j<3;j++)if(c==1)printf("%d:%d+%d=",i+1,a,b);trueValue=a+b;scanf("%d",&score[i]);if(score[i]!=trueValue)printf("答案错误,请重新输入.\n");score[i]=0;}elseif(j==0)score[i]=10;}else if(j==1)score[i]=7;}elsescore[i]=5; }break;} }elseprintf("%d:%d-%d=",i+1,a,b);trueValue=a-b;scanf("%d",&score[i]);if(score[i]!=trueValue)printf("答案错误,请重新输入.\n");score[i]=0;}elseif(j==0)score[i]=10;}else if(j==1)score[i]=7;}elsescore[i]=5; }break;} }}if(score[i]==0)printf("正确答案是:%d\n",trueValue);}sum=sum+score[i];}printf("你的成绩是:%d\n",sum);if(sum>90)printf("SMART.\n");}else if(sum>=80)printf("GOOD.\n");}else if(sum>=70)printf("OK.\n");}else if(sum>=60)printf("PASS.\n");}elseprintf("TRYAGAIN\n"); }return 0; }这位同学-.-要是你需要,我现在就帮你做...=.=. 给我半小时,帮你做他,但是前提你要在,不然我这么这么激情的做起来都没人鸟我-.- #include#include using namespace std; int score=0; void jisuan(int a,int b) { int count=1,sum,t,n; if((a+b)%2==0) { n=3; sum=a+b; cout<<"请计算:"<<<"+"<<<"="; while(n--) { cin>>t; if(t==sum) {if(count==1) score+=10; if(count==2) score+=7; if(count==3) score+=5; return ; } else { if(count!=3) cout<<"您的答案好像不对哦,请重新输入:"; else { cout<<"您已经错了三次.."< cout<<"正确答案是:"<< return ; } count++; } } } else { n=3; if(a { t=a; a=b; b=t; } sum=a-b; cout<<"请计算:"<<<"-"<<<"="; while(n--) { cin>>t; if(t==sum) {if(count==1) score+=10; if(count==2) score+=7; if(count==3) score+=5; return ; } else { if(count!=3) cout<<"您的答案好像不对哦,请重新输入:"; else { cout<<"您已经错了三次.."< cout<<"正确答案是:"<< return ; } count++; } } } } int main() { int n=10; int a,b,i,j,sum; while(n--) { srand((unsigned)time(null)); a=rand()%50; srand((unsigned)time(null)); b=rand()%49; while(1) { if(a+b<50) break; if(a>0) a--; if(b>0) b--; } jisuan(a,b); } cout<<"您的成绩为:"<< if(score>=90) cout<<"******************smart******************"; else if(score>=80&&score<90) cout<<"******************good******************"; else if(score>=70&&score<80) cout<<"*******************ok*******************"; else if(score>=60&&score<70) cout<<"******************pass******************"; else if(score>=60&&score<70) cout<<"************try again**************"; return 0; }
文章TAG:
小学生编程考试有哪些 小学生辅助考试系统100以内加减乘除 C语言编程