fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Descomponer un numero n por la derecha
  6. int n;
  7. cin >> n;
  8. while(n > 0) {
  9. int digito = n % 10;
  10. cout << digito << "\n";
  11. n = n / 10;
  12. }
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
4
6
7
2
3