MeehoweCK

Untitled

Oct 1st, 2020
389
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int liczba;
  8.     int suma = 0;
  9.  
  10.     cout << "Podaj liczby, na koniec wpisz 0." << endl;
  11.  
  12.     while ( liczba != 0)
  13.     {
  14.         cin >> liczba;
  15.  
  16.         suma = liczba + suma;
  17.     }
  18.     cout << "Suma liczb to " << suma << endl;
  19.  
  20.     return 0;
  21. }
RAW Paste Data