#include<stdio.h>
#include<stdlib.h>
main()
{
int n,a,b,c,d,e,f,g,h;
printf("【-----------主菜单-----------】\n");
printf("----------1.加法运算题---------\n");
printf("----------2.减法运算题---------\n");
printf("----------3.乘法运算题---------\n");
printf("----------4.除法运算题---------\n");
printf("----------0.退出程序---------\n");
printf("请选择:");
scanf("%d", &n);
switch(n)
{
case 1:
{
a=rand()%100+1;
b=rand()%100+1;
printf("%d+%d=\n",a,b);
break;
}
case 2:
{
c=rand()%100+1;
d=rand()%100+1;
printf("%d-%d=\n",c,d);
break;
}
case 3:
{
e=rand()%100+1;
f=rand()%100+1;
printf("%d*%d=\n",e,f);
break;
}
case 4:
{
g=rand()%100+1;
h=rand()%100+1;
printf("%d/%d=\n",g,h);
break;
}
}
}