Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (void){
- int x,y,max,min;
- float z,med;
- printf("Immetti un numero per x\n");
- scanf("%d%",&x);
- printf("Immetti un numero per y\n");
- scanf("%d",&y);
- printf("Immetti un numero per z\n");
- scanf("%f",&z);
- if((x>y) && (x>z))
- max=x;
- if((y>x) && (y>z))
- max=y;
- if ((z>x) && (z>y))
- max=z;
- if ((x<y) && (x<z))
- min=x;
- if ((y<x) && (y<z))
- min=y;
- if ((z<y) && (z<x))
- min=z;
- med=x+y+z/3;
- printf("Il numero massimo :%d\n",max);
- printf("Il numero minimo:%d\n",min);
- printf("La media:%f\n",med);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement