fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. uint32_t number = 1234;
  6.  
  7. uint8_t digitsCounter = 0;
  8.  
  9. while ( number > 0 && digitsCounter++ < 6 )
  10. {
  11. printf( "%hhu", number % 10 );
  12. number /= 10;
  13. }
  14.  
  15. while ( digitsCounter++ < 6 )
  16. {
  17. printf( "_" );
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 5672KB
stdin
Standard input is empty
stdout
4321__