Advertisement
spacerose

6 practice

Mar 8th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x, n=0,k=0;
  7.     float s = 0;
  8.     while (n < 9) {
  9.         cin >> x;
  10.         if (x > 10) {
  11.             s = s+x;
  12.             k++;
  13.         }
  14.         n++;
  15.     }
  16.     cout << s / k;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement