Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int x,y;
- float w;
- printf("Podaj wartość x\n");
- scanf("%d",&x);
- printf("Podaj wartość y\n");
- scanf("%d",&y);
- switch(x){
- case 1:w=y;
- break;
- case 2:w=y*y*6;
- break;
- case 3:w=y+1;
- w=sqrt(w);
- break;
- case 4:w=x-5;
- if (w<0) w=w-2*w;
- break;
- case 5:w=y%5; break;
- default: w=0;
- }
- printf("%f",w);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement