求解答
#include<stdio.h>
int main()
{
void action1(intx,inty),action2(intx,inty),action3(intx,inty),action4(intx,inty);
char ch;
int a=5,b=7;
ch=getchar();
switch(ch)
{
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;
}
int x,y;
void avtion1(intx,inty)
{
printf("x+y=%d\n",x+y);
}
void action2(intx,inty)
{
printf("x-y=%d\n",x-y);
}
void action3(intx,inty)
{
printf("x*y=%d\n",x*y);
}
void action4(intx,inty)
{
printf("x/y=%d\n",x/y);
}