Posts

Showing posts with the label pattern in c

Pattern Printing

Image
Hi friends.. After a long time i am here back with program codes now. today i am going to write a program for pattern printing. I am writing code to print the following pattern: Code to print this pattern is:  #include<stdio.h> #include<conio.h> void main() { int i,j,k; clrscr(); i=1; while(i<=13) { if(i<=4) { k=3;    while(k>=i)     {       printf(" ");       k--;     }      j=1;      while(j<=i)      {       printf("* ");       j++;      }  }  if(i>4 && i<=7)  {   k=5;   while(k<=i)   {   printf(" ");   k++;   }   j=7;   while(j>=i)   {   printf("* ");   j--;   }   }   if(i>7 && i<=10)   {...