void ft_print_comb(void) { char a; char b; char c; a = '0' - 1; while (a++ < '7') { b = a; while (b++ < '8') { c = b; while (c++ < '9') ft_print_numbers(a, b, c); } } }
int main(int argv, char **argc) { int ex; ex = atoi(argc[1]); if (ex == 0) ft_print_alphabet(); else if (ex == 1) ft_print_reverse_alphabet(); else if (ex == 2) ft_print_numbers(); else if (ex == 3) ft_is_negative(atoit(argc[2])); else if (ex == 4) ft_print_comb(); else if (ex == 5) ft_print_comb2(); else if (ex == 6) ft_putnbr(atoi(argc[2])); else if (ex == 7) ft_print_combn(); return (0); }
int main(int argc, char **argv) { ft_print_numbers(); ft_putchar('e'); return (0); }
int main() { ft_print_numbers(); return(0); }
int main() { start_day(2); #ifdef ex00 start_exo(0); printf("ft_print_alphabet(): "); fflush(stdout); ft_print_alphabet(); #endif #ifdef ex01 start_exo(1); printf("ft_print_reverse_alphabet(): "); fflush(stdout); ft_print_reverse_alphabet(); #endif #ifdef ex02 start_exo(2); printf("ft_print_numbers(): "); fflush(stdout); ft_print_numbers(); #endif #ifdef ex03 start_exo(3); printf("ft_is_negative(-10) = '"); fflush(stdout); ft_is_negative(-10); printf("' (correct is N)\n"); printf("ft_is_negative(0) = '"); fflush(stdout); ft_is_negative(0); printf("' (correct is P)\n"); printf("ft_is_negative(+10) = '"); fflush(stdout); ft_is_negative(10); printf("' (correct is P)\n"); #endif #ifdef ex04 start_exo(4); ft_print_comb(); fflush(stdout); #endif #ifdef ex05 start_exo(5); ft_print_comb2(); fflush(stdout); #endif #ifdef ex06 start_exo(6); printf("ft_putnbr(-10) = "); fflush(stdout); ft_putnbr(-10); printf("\n"); printf("ft_putnbr(0) = "); fflush(stdout); ft_putnbr(0); printf("\n"); printf("ft_putnbr(10) = "); fflush(stdout); ft_putnbr(10); printf("\n"); printf("ft_putnbr(-2147483647) = "); fflush(stdout); ft_putnbr(-2147483647); printf("\n"); printf("ft_putnbr(-2147483648) = "); fflush(stdout); ft_putnbr(-2147483648); printf("\n"); printf("ft_putnbr(2147483647) = "); fflush(stdout); ft_putnbr(2147483647); printf("\n"); #endif #ifdef ex07 start_exo(7); printf("ft_print_combn(0) = '"); fflush(stdout); ft_print_combn(0); printf("'\n"); printf("ft_print_combn(1) = '"); fflush(stdout); ft_print_combn(1); printf("'\n"); printf("ft_print_combn(2) = '"); fflush(stdout); ft_print_combn(2); printf("'\n"); printf("ft_print_combn(9) = '"); fflush(stdout); ft_print_combn(9); printf("'\n"); #endif return 0; }
int main () { ft_print_numbers('0'); ft_print_numbers('\n'); return(0); }
int main() { ft_print_numbers(); write(1, "\n", 1); return (0); }