Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <unistd.h>
  2.  
  3. int my_print_comb(void)
  4. {
  5. int a = 48;
  6. int b = 49;
  7. int c = 50;
  8.  
  9. while (a!=56){
  10. while (b!=57){
  11. while (c!=58){
  12. write(1, &a, 1);
  13. write(1, &b, 1);
  14. write(1, &c, 1);
  15. if (a==55)
  16. write(1, &"\n", 1);
  17. else
  18. write(1, ", ", 2);
  19. c=c+1;
  20. }
  21. b=b+1;
  22. c=b+1;
  23. }
  24. b=a+1;
  25. a=a+1;
  26. }
  27. }
  28.  
  29.  
  30. int main()
  31. {
  32. my_print_comb();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement