Advertisement
DominikPasiut

Untitled

Oct 24th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3.  
  4. {
  5.     int i,j, bok;
  6.  
  7.     printf("Podaj bok kwadratu\n");
  8.     scanf("%d", &bok);
  9.  
  10.     for(i=0; i<bok; i++)
  11.     {
  12.         printf("\n");
  13.         for(j=0; j<bok; j++)
  14.         {
  15.             if(i>0 && i<bok-1)
  16.             {
  17.                 if(j==0||j==bok-1)
  18.                 printf("* ");
  19.                 else
  20.                     printf("  ");
  21.             }
  22.  
  23.             else
  24.             printf("* ");
  25.         }
  26.     }
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement