#include #include #include int main(){ char op; float x, y; //Entrada de dados printf("*****Selecione operacao*****\n"); printf("(a)x*y\n(b)quoc(x/y)\n(c)res(x\y)\n(d)x^y\n(e)raiz(x)\n"); printf("Digite opcao:"); scanf("%c",&op); op = tolower(op); switch(op){ case 'a': printf("Digite (x,y):"); scanf("%f %f",&x,&y); printf("%.2f*%.2f=%.2f",x,y,x*y); break; case 'b': printf("Digite (x,y):"); scanf("%f %f",&x,&y); printf("quoc(%.2f,%.2f)=%d",x,y,((int) x)/((int) y)); break; case 'c': printf("Digite (x,y):"); scanf("%f %f",&x,&y); printf("res(%.2f,%.2f)=%d",x,y,((int)x)%((int)y)); break; case 'd': printf("Digite (x,y):"); scanf("%f %f",&x,&y); printf("%.2f^%d)=%.2f",x,(int) y,pow(x,(int) y)); break; case 'e': printf("Digite x:"); scanf("%f",&x); printf("raiz(%.2f)=%.2f",x,sqrt(x)); break; default: printf("Opcao invalida"); } return 0; }