fork(8) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n = 123456;
  7.  
  8. while (n != 0) {
  9. cout << n % 10 << endl;
  10. n = n/10;
  11. }
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
6
5
4
3
2
1