Advertisement
Md_hosen_zisad

summsion

Sep 10th, 2017
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,n,sum=0,i,avg;
  5.     scanf("%d",&n);
  6.     for(i=0;i<=n;i++)
  7.     {
  8.         scanf("%d",&a);
  9.         sum=sum+i;
  10.  
  11.     }
  12.     avg=sum/n;
  13.     printf("sum %d avg %d ",sum,avg);
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement