#include <stdio.h>
#include<math.h>
int add(int a1,int a2)
{
int s;
s=a1+a2;
return s;
}
int Subtr(int a1,int a2)
{
int s;
s=a1-a2;
return s;
} int Multi(int a1,int a2)
{
long s;
s=a1*a2;
return s;
} int Divi(int a1,int a2)
{
float s;
s=(float)a1/(float)a2;
return s;
}
int Square(int a1)
{
int s;
s=a1*a1;
return s;
}
int Sr(int a1)
{
float s;
s=sqrt((float)a1);
return s;
}
int Abs(int a1)
{
int s;
s=abs(a1);
return s;
}
void main()
{
int i,b1,b2;
do
{
printf("Function Menu\n");
printf("...................................\n");
printf("[1]Add [2]Subtr\n");
printf("[3]Multi [4]Divi\n");
printf("[5]Square [6]Sr\n");
printf("[7]Abs [8]Go\n");
printf("...................................\n");
printf("Please input your choose( )\b\b");
scanf("%d",&i);
switch(i)
{
case 1: printf("Please input two int\n");
scanf("%d%d",&b1,&b2);
printf("%d + %d to %d\n",b1,b2,add(b1,b2));
break;
case 2: printf("Please input two int\n");
scanf("%d%d",&b1,&b2);
printf("%d - %d to %d\n",b1,b2,Subtr(b1,b2));
break;
case 3: printf("Please input two int\n");
scanf("%d%d",&b1,&b2);
printf("%d * %d to %d\n",b1,b2,Multi(b1,b2));
break;
case 4: printf("Please input two int\n");
scanf("%d%d",&b1,&b2);
printf("%d / %d to %d\n",b1,b2,Divi(b1,b2));
break;
case 5: printf("Please input two int\n");
scanf("%d",&b1);
printf("Square=%d\n",Square(b1));
break;
case 6: printf("Please input two int\n");
scanf("%d",&b1);
printf("Sr=%f\n",Sr(b1));
break;
case 7: printf("Please input two int\n");
scanf("%d",&b1);
printf("Abs=%d\n",Abs(b1));
case 8: break;
/*default printf("Error\n"); */
} }while(i<8);
}