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