/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_print_comb2.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gbaconni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/08/05 17:39:09 by gbaconni #+# #+# */ /* Updated: 2021/08/06 11:45:50 by gbaconni ### ########.fr */ /* */ /* ************************************************************************** */ #include void ft_print_comb2(void) { int x; int y; char str[2]; x = 0; while (x <= 99) { y = 1; while (y <= 99) { str[0] = (x / 10) + '0'; str[1] = (x % 10) + '0'; write(1, &str, 2); write(1, " ", 1); str[0] = (y / 10) + '0'; str[1] = (y % 10) + '0'; write(1, &str, 2); if (y != 99 || x != 99) write(1, ", ", 2); y++; } x++; } }