Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define N 15
- int main(void)
- {
- int n,min,max,data[N],i;
- double media;
- for(i=0;i<N;i++)
- scanf("%d",&data[i]);
- media=max=min=data[0];
- for(n=1;n<N;n++)
- {
- if (data[n]<min) min=data[n];
- if (data[n]>max) max=data[n];
- media+=data[n];
- }
- media/=N;
- printf("%d %d %lf \n",min,max,media);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement