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,z,a;
- printf("Enter three numbers: ");
- scanf("%d %d %d",&x,&y,&z);
- a=x+y+z;
- float b,c,d,e;
- b=a/3.0;
- printf("Average=%.02f\n",b);
- c=x-b;
- d=y-b;
- e=z-b;
- printf("Deviation:\n");
- printf("%d \t%.02f\n%d \t%.02f\n%d \t%.02f",x,c,y,d,z,e);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement