Follow by Email

3/24/19

pattern printing in c language using loop

pattern printing in c language using loop


#include<stdio.h>

int main()

{

    int i,j,k;

    for(i=0;i<=5;i++)

   {



 

    for(j=0;j<=i;j++)

    {

        printf("%d",j);

   }
for(k=0;k<=10-(2*i);k++)
{
    printf(" ");
}
int l=i;
for(l=i;l>=0;l--)
{
    printf("%d",l);
    }
   printf("\n");

   }

   return 0;
}

output-

pattern printing in c language
output


doubt comment box mai puche
ask doubt in comment box.
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
 

best and cheap hosting

Delivered by FeedBurner