fork download
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. int main() {
  5. int k = 0;
  6. int n = 1234;
  7.  
  8. while (n != 0)
  9. {
  10. k *= 10;
  11. k += n % 10;
  12. n /= 10;
  13. }
  14.  
  15. printf("%d", k);
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
4321