Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. int main ()
  3. {
  4.     int max,br1,br2;
  5.     scanf("%d",&max);
  6.     for(br1=0;br1<max;br1++)
  7.     {
  8.         for(br2=0;br2<max;br2++)
  9.             {
  10.                 if(br1==0||br1==max-1)
  11.         {
  12.         printf("+");
  13.         continue;}
  14.                 if(br2==0||br2==max-1)
  15.         {
  16.         printf("+");
  17.         continue;}
  18.                 printf("-");
  19.             }
  20.             printf("\n");
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement