Code Scrappers


Print Rectangle Using * - C program


              #include<stdio.h>
              #include<stdlib.h>

              void main()
              {
                   int i, j;

                   for (i = 0; i < 13; i++)
                   {
                       printf("\n");

                       for (j = 0; j < 13; j++)
                       {
                           if (i == 0 || i == 12 || j == 0 || j == 12)
                           {
                                printf("*");
                           }

                           else
                           {
                                printf("-");
                           }
                       }
                   }
              }

          



Output

      **********
      *--------*
      *--------*
      *--------*
      *--------*
      *--------*
      *--------*
      *--------*
      *--------*
      **********