Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,n,sum=0,i,avg;
- scanf("%d",&n);
- for(i=0;i<=n;i++)
- {
- scanf("%d",&a);
- sum=sum+i;
- }
- avg=sum/n;
- printf("sum %d avg %d ",sum,avg);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement