fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. unsigned int liczba, cyfra;
  7.  
  8. cout << "Podaj liczbe: ";
  9. cin >> liczba;
  10.  
  11. cout << "Cyfry liczby " << liczba << " od ostatniej cyfry:" << endl;
  12.  
  13. do
  14. {
  15. cyfra = liczba % 10;
  16. cout << cyfra << endl;
  17. liczba = liczba / 10;
  18. }
  19. while (liczba != 0);
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Podaj liczbe: Cyfry liczby 5205 od ostatniej cyfry:
5
0
2
5