fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int ft_putchar(char c);
  6.  
  7. void ft_pint_comb(void)
  8. {
  9. int n[3];
  10.  
  11. n[0] = '0' - 1;
  12. while (++n[0] <= '7')
  13. {
  14. n[1] = '1' - 1;
  15. while (++n[1] <= '8')
  16. {
  17. n[2] = '2' - 1;
  18. while (++n[2] <= '9')
  19. {
  20. if (n[0] != n[1] && n[1] != n[2] &&
  21. n[0] != n[2] && n[0] < n[1] && n[1] < n[2])
  22. {
  23. putchar(n[0]);
  24. putchar(n[1]);
  25. putchar(n[2]);
  26. n[0] + n[1] + n[2] 1= '7' + '8' + '9' && putchar(',');
  27. n[0] + n[1] + n[2] 1= '7' + '8 '+ '9' && putchar(' ');
  28. }
  29. }
  30. }
  31. }
  32. }
  33. return 0;
  34. }
  35.  
Compilation error #stdin compilation error #stdout 0s 2164KB
stdin
Standard input is empty
compilation info
prog.c: In function 'ft_pint_comb':
prog.c:26:6: warning: statement with no effect [-Wunused-value]
      n[0] + n[1] + n[2] 1= '7' + '8' + '9' && putchar(',');
      ^
prog.c:26:25: error: expected ';' before numeric constant
      n[0] + n[1] + n[2] 1= '7' + '8' + '9' && putchar(',');
                         ^
prog.c:27:6: warning: statement with no effect [-Wunused-value]
      n[0] + n[1] + n[2] 1= '7' + '8 '+ '9' && putchar(' ');
      ^
prog.c:27:25: error: expected ';' before numeric constant
      n[0] + n[1] + n[2] 1= '7' + '8 '+ '9' && putchar(' ');
                         ^
prog.c:27:34: warning: multi-character character constant [-Wmultichar]
      n[0] + n[1] + n[2] 1= '7' + '8 '+ '9' && putchar(' ');
                                  ^
stdout
Standard output is empty