Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ** my_aff_comb2.c for J03_my_aff_comb2 in /home/viller_m/rendu/Piscine_C_J03
- **
- ** Made by mickael villers
- ** Login <[email protected]>
- **
- ** Started on Wed Oct 1 11:41:10 2014 mickael villers
- ** Last update Wed Oct 1 14:16:52 2014 mickael villers
- */
- void my_aff_number(char nb1, char nb2, char nb3, char nb4, int type)
- {
- if (type == 1)
- {
- my_putchar(',');
- my_putchar(' ');
- }
- my_putchar(nb1);
- my_putchar(nb2);
- my_putchar(' ');
- my_putchar(nb3);
- my_putchar(nb4);
- }
- void my_loop(char nb1, char nb2, char nb3, char nb4)
- {
- while (nb1 != '9' || nb2 != '8')
- {
- nb4 = nb4 + 1;
- if (nb4 > '9')
- {
- nb4 = '0';
- nb3 = nb3 + 1;
- if (nb3 > '9')
- {
- nb3 = '0';
- nb2 = nb2 + 1;
- if (nb2 > '9')
- {
- nb2 = '0';
- nb1 = nb1 + 1;
- }
- nb4 = nb2 + 1;
- nb3 = nb1;
- }
- }
- my_aff_number(nb1, nb2, nb3, nb4, 1);
- }
- }
- int my_aff_comb2()
- {
- my_aff_number('0', '0', '0', '1', 0);
- my_loop('0', '0', '0', '1');
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement