Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- unsigned liczba;
- unsigned ilosc_liczb = 0;
- unsigned suma = 0;
- if(ilosc_liczb < 10)
- {
- cin >> liczba;
- suma += liczba; // zwiększamy wartość zmiennej suma o wartość zmiennej liczba
- ++ilosc_liczb;
- }
- cout << "Suma wczytanych liczb wynosi " << suma << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement