Created
August 25, 2022 09:47
-
-
Save kmbenjel/dc316415c44ff1ce0681e951e3e5eae5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<unistd.h> | |
void ft_putchar(char c) | |
{ | |
write(1, &c, 1); | |
} | |
void ft_print_comb2(void) | |
{ | |
int a; | |
int b; | |
a = 0; | |
while (a <= 98) | |
{ | |
b = 1; | |
while (b <= 99) | |
{ | |
ft_putchar((a / 10) + '0'); | |
ft_putchar((a % 10) + '0'); | |
ft_putchar(' '); | |
ft_putchar((b / 10) + '0'); | |
ft_putchar((b % 10) + '0'); | |
if (!(a == 98 && b == 99)) | |
{ | |
ft_putchar(','); | |
ft_putchar(' '); | |
} | |
b++; | |
} | |
a++; | |
} | |
} | |
int main() | |
{ | |
ft_print_comb2(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment