fork download
  1. using System;
  2. #include <stdio.h>
  3. void DecToBin( int n )
  4. {
  5.  
  6. if ( n >= 2 )
  7. {
  8. DecToBin( n/2 );
  9. }
  10. printf("%d", n % 2);
  11.  
  12. }
  13.  
  14.  
  15. int main ()
  16. {
  17.  
  18. int n;
  19. printf("n = ? ");
  20. scanf("%d", &n);
  21.  
  22. printf(" (Dec) = ");
  23. DecToBin( n );
  24. printf(" (Bin)\n");
  25. system("pause");
  26. return 0;
  27.  
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(3,0): error CS1024: Wrong preprocessor directive
prog.cs(3,0): error CS1525: Unexpected symbol `void'
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty