the coding is written for a simple floyd triangle looking like below!
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
here th no. of lines is :7
Code:
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
clrscr();
printf("enter the terms :");
scanf("%d",&m);
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n-i;j++)
printf(" ");
for(j=1;j<=i;j++)
printf("* ");
printf("\n");
}
getch();
}
thank u
