Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int cat,R;
- double a,b,c,X;
- char SIM[20],NAO[20];
- printf("Entre com o valor de A:");
- scanf("%lf",&a);
- printf("Entre com o valor de B:");
- scanf("%lf",&b);
- printf("Entre com o valor de C:");
- scanf("%lf",&c);
- do {
- printf("Entre cum uma categoria:");
- scanf("%d",&cat);
- switch(cat)
- {
- case 1 :
- X = sin(a) + cos(b);
- break;
- case 2:
- X = tan(c) - cos(b);
- break;
- case 3:
- X = (cos(c) - tan(a)) / sin(b);
- break;
- case 4:
- X = sqrt((sin(a)* sin(a)) - 1);
- break;
- case 5:
- X = sqrt(cos(a)*sin(b));
- break;
- }
- printf("X = %lf\n",X);
- printf("Deseja continuar? SIM ou NAO\n");
- scanf(" %s",&R);
- } while (R==SIM);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement