Advertisement
Guest User

Untitled

a guest
Jul 26th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. void rush(int x, int y)
  2. {
  3.     for(int i = 1; i <= y; i++)
  4.     {
  5.         for(int j = 1; j <= x; j++)
  6.         {
  7.             if (((j == 1) && (i == 1)) ||
  8.                 ((j == 1) && (i == y)))
  9.             {
  10.                 ft_putchar('A');
  11.             }
  12.             else if ((j > 1) &&
  13.                      (j < x) &&
  14.                      (i > 1) &&
  15.                      (i < y))
  16.             {
  17.                 ft_putchar(' ');
  18.             }
  19.             else if (((j == x) && (i == 1)) ||
  20.                      ((j == x) && (i == y)))
  21.             {
  22.                 ft_putchar('C');
  23.             }
  24.             else
  25.             {
  26.                 ft_putchar('B');
  27.             }
  28.         }
  29.         ft_putchar('\n');
  30.     }
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement