October 14, 2008 thumb Iteration

 

/*play with looping*/
/*it compile using DevC++, it just for fun, play with programing*/
#include"stdio.h"
#include "conio.h"
main(void)
{
int a,b,c;
printf("insert the number of looping = ");
scanf("%d",&a);
for(b=a;b>=1;b--)
{
for(c=b;c>=1;c--)
{
printf("*");
}
printf("\n");
}
for(b=2;a>=b;b++)
{
for(c=0;c>=c-1;c++)
{
printf("*");
}
printf("\n");
}
getch();
}

Comments

total comments