2dix-The Student Choice
Log in Register now

c++ Program of FLOYD’S TRIANGLE

Write a Program of  FLOYD’S TRIANGLE
1
2 3
4 5 6

#include<iostream.h> 

#include<conio.h> 


void main()
{
int i,j,r,k=1;
clrscr();
printf("\nEnter the range:");
scanf("%d",&r);
7
By:Ms-Kamalpreet Kaur (14960)
printf("\nFLOYD'S TRIANGLE\n\n");
for(i=1;i<=r;i++)
{
for(j=1;j<=i;j++,k++)
printf(" %d",k);
printf("\n");
}
getch();
}



Note:    
           If you want to change in this program please write through the comment on this page. you can also past similar program of 
             c++ with output.your comment is valuable to the other user and person.

comments (1)

avatar