Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int liczba, suma = 0;
- do
- {
- cout << "Wpisz liczbe (0 konczy wczytywanie): ";
- cin >> liczba;
- switch(liczba)
- {
- case 0:
- break;
- default:
- suma += liczba;
- }
- } while(liczba != 0);
- cout << "Suma wczytanych liczb wynosi " << suma << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement