Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch and case
- #include <math.h>
- #include <stdio.h>
- main()
- {
- int m; float a=3,i=2,y=2.7,x=1;
- double v=0;
- printf("Vvedite M: ");
- scanf("%d",&m);
- switch (m)
- {
- case 1: {
- v=0.5*a+cos(a)/y;
- printf("%6.2lf",v);
- }break;
- case 5:{
- v=y*y-i;
- printf("%6.2lf",v);
- }break;
- case 7: {
- v=x+(x*x)/-1/3;
- printf("%6.2lf",v);
- } break;
- default: printf("!!!!!!!!!!!!!!!!!NET RESHENIYA!!!!!!!!!!!!!!!!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement