wojiaocbj

Problem.C

Jun 9th, 2022
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.15 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.     int n=0,i;
  4.     double x,av=0;
  5.     while(~scanf("%lf",&x)){
  6.         n++;
  7.         av += x;
  8.     }
  9.     printf("%.2f\n",av/n);
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment