Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int liczba, sumaCyfr=0, tmp;
- cin >> liczba;
- while(liczba!=0)
- {
- tmp=liczba%10;
- sumaCyfr=sumaCyfr+tmp;
- liczba=liczba/10;
- cout << "tmp: " << tmp << endl;
- cout << "sumaCyfr: " << sumaCyfr << endl;
- cout << "Liczba: " << liczba << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement