#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
int i = 0;
srand((unsigned)time(NULL));
while(i<30)
{
int a = rand()%100;
int b = rand()%100;
int j;
j = rand()%4;
printf("%d", a);
switch(j)
{
case 0:
printf("+");
break;
case 1:
printf("-");
break;
case 2:
printf("*");
break;
case 3:
printf("/");
break;
}
printf("%d", b);
printf(" = \n");
i++;
}
return 0;
}
原文地址:https://www.cnblogs.com/fffxf/p/9762224.html
时间: 2024-09-30 01:35:00