*
* *
* * *
* * * *
* * * * *
-----------------------------------------------------------------------
/*Serial No.23 [swami144.cpp]*/
/* this program prints traingle as big as u want.*/
#include<stdio.h>
#include<conio.h>
int i,j,n;
void main()
{
clrscr();
printf("Enter the no. of lines of traingle:");
scanf("%d",&n);
printf("\n");
for(i=1;i<=n;i++)
{printf("*\n");
if(j==n)
break;
for(j=1;j<=i;j++)
printf("*");
}
getch();
}
#include<stdio.h>
#include<conio.h>
int i,j,n;
void main()
{
clrscr();
printf("Enter the no. of lines of traingle:");
scanf("%d",&n);
printf("\n");
for(i=1;i<=n;i++)
{printf("*\n");
if(j==n)
break;
for(j=1;j<=i;j++)
printf("*");
}
getch();
}
No comments:
Post a Comment
If you have any doubt, feel free to ask...