Search This Blog

Translate

c program pattern example

c program  pattern example  with source code

#include
#include
void main()
{
int i,j,m=18,s,k;
clrscr();
for(i=1;i<=10;i++) { for(j=1;j<=i;j++) { printf("*"); } for(s=m;s>=1;s--)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("*");
}
printf("\n");
m=m-2;
}

getch();
}

C Program example List

Google+ Badge