Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //algorytm obliczajacy sume liczb wczytywanych z klawiatury nie wiekszych od 50
- #include <iostream>
- using namespace std;
- main()
- {
- double s=0, a=0;
- do
- {
- s+=a;
- cout<<"podaj liczbe rzeczywista: ";
- cin>>a;
- }
- while(a<=50);
- cout<<"suma = " <<s<<endl;
- //system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement