fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void cyfry(int liczba) {
  5. while (liczba > 0) {
  6. cout << liczba % 10 << endl;
  7. liczba = liczba / 10;
  8. }
  9. cout << "\n";
  10. }
  11.  
  12. int main() {
  13. cyfry(1234);
  14. cyfry(243452141);
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5432KB
stdin
Standard input is empty
stdout
4
3
2
1

1
4
1
2
5
4
3
4
2