Advertisement
MeehoweCK

Untitled

Jan 29th, 2024
706
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.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     unsigned int suma{}, liczba;
  7.     for (short int i{}; i < 10; ++i) {
  8.         cout << "Podaj liczbe naturalna: ";
  9.         cin >> liczba;
  10.         suma += liczba;
  11.     }
  12.     cout << "Suma wczytanych liczb wynosi " << suma << endl;
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement