标签:print png main res div clu ret http char
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
int i;
int num1, num2;
int op,result, score=0;
char oper[]={‘+‘,‘-‘,‘*‘,‘/‘};
srand(time(0));
for(i=0; i<30; i++)
{
printf("第%d题 ", i+1);
num1 = rand()%101;
num2 = rand()%101;
op = rand()%4;
switch(op){
case 0:
printf("%d %c %d = \n", num1, oper[op], num2);
break;
case 1:
printf("%d %c %d = \n", num1, oper[op], num2);
break;
case 2:
printf("%d %c %d = \n", num1, oper[op], num2);
break;
case 3:
printf("%d %c %d = \n", num1, oper[op], num2);
break;
}
}
return 0;
}
二柱子的疑难杂症
标签:print png main res div clu ret http char
原文地址:https://www.cnblogs.com/980412peanut/p/9756165.html