this is the for loop output. i'm still figuring out if i'm going to use function call in this type of problem.. do you have any idea with regards to this problem? MY sample program here was to long, i think there is an easy way to cope it shorter..
i started it with this,
#inlcude<stdio.h>
int main()
{
int i,j;
for(i=1;i<=3;i++)
{ for( j=0; j<i; j++)
{printf("*");
printf("\n");
}
for(i=2; i<=4; i++)
{for(j=0;j<i;j++)
{printf("*");
printf("\n);
}
for(i=3; i<=5; i++)
{for(j=0;j<i;j++)
{printf("*");
printf("\n);
}
for(i=4; i<=5; i++)
{for(j=0;j<i;j++)
{printf("*");
printf("\n);
}
for(i=5; i<=6; i++)
{for(j=0;j<i;j++)
{printf("*");
printf("\n);
}
return 0;
}
THIS IS THE OUTPUT:
*
**
***
**
***
****
***
****
*****
****
*****
******