how to print number triangle in c language : pattern printing

how to print number  triangle in c language : pattern printing

#include<stdio.h>
int main()
{
    int i,j,k;
    for(i=0;i<=5;i++)
   {

 
    for(j=0;j<=i;j++)
    {
        printf("%d",j);
   }
   printf("\n");
   }
   return 0;
}

output

pattern printing
output

doubt comment box mai puche
ask doubt in comment box.
Previous
Next Post »