Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() //2zad
- {
- int suma=0,lb,x;
- cout << "Ile liczb mam ssumowac?" << endl;
- cin >> x;
- while (x>0)
- {
- cout <<"podaj liczbe: "<<endl;
- cin>> lb;
- suma=suma+lb;
- x--;
- }
- cout <<"wynik to: "<<suma;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement