Pattern Printing 26

You may also like...

2 Responses

  1. October 1, 2014

    […] #include<stdio.h> int main(){     int length,width;     printf("Enter length:");     scanf("%d",&length);     printf("Enter width:");     scanf("%d",&width);     int i,j;     //This loop prints columns ie width     for(i=1;i<=width;i++){         //This loop prints rows ie length         for(j=1;j<=length;j++){             //Check if it lies on the border             //i==1 –> means first row             //i==width –> means last row             //j==1 –> means first column             //j==length –> means last column             if(i==1||i==width||j==1||j==length){                 printf("*");             }else{//Else print space                 printf(" ");             }         }         //Goto next line         printf("n");     }     return 0; } Pattern Printing 28 Category: Printing Pattern Pattern Printing 26 […]

  2. October 1, 2014

    […] Pattern Printing 26 Category: Printing Pattern Pattern Printing 24 […]

Leave a Reply

Your email address will not be published. Required fields are marked *