Thursday, September 20, 2012

program to print the triangle

*just atriangle */

#include<conio.h>
#include<stdio.h>
void main()
{
int i,j,n;
clrscr();
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}

No comments:

Post a Comment