fork download
  1. #include <iostream>
  2. /////////////////////////////////////////////////////////////////////////////////////////
  3. typedef long long T_int;
  4. /////////////////////////////////////////////////////////////////////////////////////////
  5. void print_number_in_column( T_int n )
  6. {
  7. std::cout << (
  8. abs(n) < 10
  9. ? n
  10. : print_number_in_column( n / 10 ), abs(n % 10)
  11. )
  12.  
  13. << std::endl;
  14. }
  15. /////////////////////////////////////////////////////////////////////////////////////////
  16. int main()
  17. {
  18. for(;;)
  19. {
  20. T_int n = 0;
  21. // std::cout << "n = ";
  22. //std::cin >> n;
  23. n = 12569;
  24.  
  25. print_number_in_column(n);
  26. std::cout << std::endl;
  27. }//for
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void print_number_in_column(T_int)’:
prog.cpp:10:64: error: third operand to the conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor of type ‘void’
                             :   print_number_in_column( n / 10 ), abs(n % 10)
                                                                ^
stdout
Standard output is empty