Advertisement
MeehoweCK

Untitled

Jun 4th, 2021
1,147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     cout << "Podaj 10 liczb naturalnych: ";
  8.     unsigned liczba;
  9.     unsigned suma = 0;
  10.  
  11.     for(short i = 0; i < 10; ++i)
  12.     {
  13.         cin >> liczba;
  14.         suma += liczba;
  15.     }
  16.     cout << "Suma wpisanych liczb wynosi " << suma << endl;
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement