#include<stdio.h>
#include<math.h>
main()
{
float x,y,ans;
int choice;
do
{
printf(“n\t MENU \n”);
printf(“\n\t 1.SINE”);
printf(“\n\t 2.COSINE”);
printf(“\n\t 3.TANGENT”);
printf(“\n\t 4.NATURAL LOGARITHM”);
printf(“\n\t 5.LOGARITHM TO THE BASE 10″);
printf(“\n\t 6.POWER(X RAISE TO Y”);
printf(“\n\t 7.EXPONENTIAL VALUE”);
printf(“\n\t 8.SQUARE ROOT”);
printf(“\n\t 9.EXIT \n”);
printf(“ENTER MENU CHOICE\n”);
scanf(“%d”,&choice);
printf(“ENTER THE VALUE FOR X\n”);
scanf(“% f”,&x);
switch(choice)
{
case 1:ans=sin(x);
printf(“\n SINE OF % f IS % f \n”,x,ans);
break;
case 2:ans=cos(x);
printf(“COSINE OF % f IS % f \n”,x,ans);
break;
case 3:ans=sin(x)/cos(x);
printf(“TANGENT OF % f IS % f\n”,x,ans);
break;
case 4:ans=log(x);
printf(“LOGARITHM OF % f IS % f\n”,x,ans);
break;
case 5:ans=log10(x);
printf(“\n LOGARITHM TO THE BASE 10 OF % f IS % f\n”,x,ans);
break;
case 6 :printf(“ENTER THE VALUE OF Y\n”);
scanf(“%d”,&y);
ans= pow(x,y);
printf(“\n POWER OF X^y IS % f\n”,ans);
break;
case 7: ans=exp(x);
printf(“\n EXPONENTIAL VALUE OF % f IS % f\n”,x,ans);
break;
case 8: ans=sqrt(x);
printf(“\n SQUAREROOT OF % f IS % f \n”,x,ans);
break;
}
}
while(choice!=9);
getch();
return;
}