Friday, August 23, 2019

Pattern 10

Pattern 10:

*   *  * *    *    * *  *   * best excersice in cprograms.



*   *
 * *
  * 
 * *
*   *

#include<stdio.h>
#include<conio.h>

void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=5;j++)
{
if(i==j || i+j==5+1)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
getch();
}


EmoticonEmoticon