Advertisement
Guest User

5

a guest
Dec 15th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int liczba, suma=0;
  8.     double srednia;
  9.  
  10.     for (int i=0; i<10; i++){
  11.             cin>>liczba;
  12.             suma+=liczba;
  13.     }
  14.     srednia=(double)suma/10;
  15.  
  16.     cout<<"srednia: "<<srednia<<endl;
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement