#include
void action1(int x,int y)
{
printf("x+y=%d\n",x+y);
}
viod action2(int x,int y)
{
printf("x-y=%d\n",x-y);
}
void action3(int x,int y)
{
printf("x*y=%d\n",x*y);
}
void action4(int x,int y)
{
printf("x/y=%d\n",x/y);
}
int main()
{
int a,b;
printf("請輸入a與b的值:\na:\nb:\n");
scanf("%d%d",&a,&b);
printf("A加法B減法C乘法D除法");
run=getchar();
switch(run)
{
case 'A':action1(a,b);break;
case'B':action2(a,b);break;
case'C':action3(a,b);break;
case'D':action4(a,b);break;
default:putchar('\a');
}
return 0;
}
run 的定義在哪裡?沒有看到。