Monday, September 21, 2009

TC Triangle Asterisk

by request:
create a program that will generate this output:
***
**_
*__

and

***
_**
__*

here is is



here is the complete code

#include
#include
int a,b,c;
main()
{
clrscr();
printf("\nProblem # 1\n\n");
for(a=1;a<=3;a++) { for(c=3;c>=a;c--)
printf("*");
for(b=1;b=a;c--)
printf("*");
printf("\n");
}

//my signature...

printf("\n");
printf("\n");
printf("############################\n");
printf("# #\n");
printf("# James Angelo Aves #\n");
printf("# james_03_aves@yahoo.com #\n");
printf("# #\n");
printf("############################\n");
getch();
}