Code: CPP
#include<stdio.h>
main()
{
int x,y,z;
for(x=1;x<=40;x+=2)
{
for(y=1;y<=40-x;y+=2)
{
printf(" ");
}
for(z=1;z<=x;z++)
{
printf("*");
}
printf("\n");
}
}

Last edited by SaswatPadhi; 17Sep2009 at 12:49.. Reason: Code-Blocks