Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ft_putchar(char c);
- 13 void print_first_line2(int h)
- 14 {
- 15 int i;
- 16
- 17 i = 0;
- 18 ft_putchar('A');
- 19 while (i < (h - 2))
- 20 {
- 21 ft_putchar('B');
- 22 i++;
- 23 }
- 24 if (h > 1)
- 25 ft_putchar('A');
- 26 ft_putchar('\n');
- 27 }
- 28
- 29 void print_line2(int h)
- 30 {
- 31 int i;
- 32
- 33 i = 0;
- 34 ft_putchar('B');
- 35 while (i < (h - 2))
- 36 {
- 37 ft_putchar(' ');
- 38 i++;
- 39 }
- 40 if (h > 1)
- 41 ft_putchar('B');
- 42 ft_putchar('\n');
- 43 }
- 44
- 45 void print_last_line2(int h)
- 46 {
- 47 int i;
- 48
- 49 i = 0;
- 50 ft_putchar('C');
- 51 while (i < (h - 2))
- 52 {
- 53 ft_putchar('B');
- 54 i++;
- 55 }
- 56 if (h > 1)
- 57 ft_putchar('C');
- 58 ft_putchar('\n');
- 59 }
- 60
- 61 void rush02a(int h, int v)
- 62 {
- 63 int i;
- 64
- 65 i = 0;
- 66 if (h < 1 || v < 1)
- 67 return ;
- 68 print_first_line2(h);
- 69 while (i < (v - 2))
- 70 {
- 71 print_line2(h);
- 72 i++;
- 73 }
- 74 if (v > 1)
- 75 print_last_line2(h);
- 76 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement