Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5.  
  6. int main()
  7. {
  8.     float a,n;
  9.     float sar = 0;
  10.     for(a = 1 ;a <= 1000 ;a++){
  11.             sar += a;
  12.     }
  13.     printf("%f", sar/a );
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement