#include<stdio.h>
int main(){
int n=0;
while(n<=10000000000){
int a=rand()%100+1;
int b=rand()%100+1;
int j=a*b;
n=n+1;
printf("%d*%d=",a,b);
int k;
scanf("%d",&k);
if(k==j){
printf("正确!\n");
}
else{
printf("错误!\n");
}
if(n==50){
printf("您已拥有初级答题帮助道具!\n");
int s=0;
while(s<=200){
s=s+1;
int c=rand()%100+1;
int d=rand()%100+1;
int u=c*d;
int x=u-100;
int z=u+100;
printf("答案在%d和%d之间\n",x,z);
printf("%d*%d=",c,d);
int kk;
scanf("%d",&kk);
if(kk==u){
printf("正确!\n");
}
else{
printf("错误!\n");
}
if(s==100){
printf("您已获得高级帮助道具!\n");
int ss=0;
while(ss<=500){
ss=ss+1;
int e=rand()%100+1;
int f=rand()%100+1;
printf("答案在%d和%d之间\n",x,z);
int uu=e*f;
int xxx=uu-159;
printf("正确答案是%d+159\n",xxx);
printf("%d*%d=",e,f);
int kkk;
scanf("%d",&kkk);
if(kkk==uu){
printf("正确!\n");
}
else{
printf("错误!\n");
}
if(ss==300){
printf("您已拥有终级答题帮助道具!\n");
for(;;){
int g=rand()%100+1;
int h=rand()%100+1;
int ght=g*h;
printf("正确答案为%d\n",ght);
printf("%d*%d=",g,h);
int kst;
scanf("%d",&kst);
if(kst==ght){
printf("正确!\n");
}
else{
printf("错误!\n");
}
}
}
}
}
}
}
}
return 0;
}
算之王小游戏源代码
最新推荐文章于 2024-08-14 17:18:35 发布