# include <stdio.h>
int main ()
int sum;
int a;
double pai=3.14;
printf("请输入a的值");
scanf("%d",&a);
{ void action1(int),action2(int,int),action3(int);
int bianhao;
scanf("%d",&bianhao);
printf("请选择编号:1,正方形;2,长方形;3,圆形;");
switch(bianhao)
{
case '1':action1(a);break;
case '2':action2(a);break;
case '3':action3(a);break;
default:printf("enter datd error");
}
return 0;
}
void action1(int x)
{
printf("sum=a*a%d\n",sum);
}
void action2(int x,int y)
{
printf("sum=x*y%d\n",sum);
}
void action3 (int r)
{
printf("sum=pai*r*r%d\n",sum);
}
leic
onemoo
相关分类