Archived
first commit
This commit is contained in:
1 parent
1fe062c970
commit
eb6b113e51
125 files changed
+2987
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void ft_print_nb(char a, char b, char c)
|
||||
{
|
||||
write(1, &a, 1);
|
||||
write(1, &b, 1);
|
||||
write(1, &c, 1);
|
||||
}
|
||||
|
||||
void ft_print_comb(void)
|
||||
{
|
||||
char a;
|
||||
char b;
|
||||
char c;
|
||||
|
||||
a = '0';
|
||||
while (a <= '7')
|
||||
{
|
||||
b = a + 1;
|
||||
while (b <= '8')
|
||||
{
|
||||
c = b + 1;
|
||||
while (c <= '9')
|
||||
{
|
||||
ft_print_nb(a, b, c);
|
||||
if (a != '7')
|
||||
{
|
||||
write(1, ", ", 2);
|
||||
}
|
||||
c++;
|
||||
}
|
||||
b++;
|
||||
}
|
||||
a++;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user