fork download
  1. #include <unistd.h>
  2.  
  3. void ft_print_comb(void)
  4. {
  5. char x;
  6. char y;
  7. char z;
  8.  
  9. x = '0';
  10. y = '1';
  11. z = '2';
  12.  
  13. while (x <= '7')
  14. {
  15. while (y <= '8')
  16. {
  17. while (z <= '9')
  18. {
  19. write(1, &x, 1);
  20. write(1, &y, 1);
  21. write(1, &z, 1);
  22. if (x <= '7' && y <= '8' && z <= '9')
  23. {
  24. write(1, ", ", 2);
  25. }
  26. z++;
  27. }
  28. y++;
  29. z = y + 1;
  30. }
  31. x++;
  32. x = z + 1;
  33. z = x + 2;
  34. }
  35. }
  36.  
  37. int main(void)
  38. {
  39. ft_print_comb();
  40. return (0);
  41. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
012, 013, 014, 015, 016, 017, 018, 019, 023, 024, 025, 026, 027, 028, 029, 034, 035, 036, 037, 038, 039, 045, 046, 047, 048, 049, 056, 057, 058, 059, 067, 068, 069, 078, 079, 089,