F How to write a pattern program in C? | CodeTheta

How to write a pattern program in C?

January 18, 2014

/* http://native-code.blogspot.com */
#include<stdio.h>
#include<conio.h>
void main()
{ 
    printf("/* http://native-code.blogspot.com */");
    int i,j;
for(i=1;i<7;i++)
{
printf("\n");
   for(j=1;j<(i);j++)
   {
   printf("%d",j);
    }
}
    for(i=1;i<6;i++)
{
printf("\n");
   for(j=1;j<(7-i);j++)
   {
   printf("%d",j);
    }
}
getch();
}
/* http://native-code.blogspot.com */

Post a Comment