Showing posts with label Reverse Floyds Triangle. Show all posts
Showing posts with label Reverse Floyds Triangle. Show all posts

Reverse Floyds Triangle

7 8 9 10
4 5 6
2 3
1


#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
i=7;
for(j=3;j>=0;j--)
{
for(k=0;k<=j;k++)
{
printf("%d ",(i+k));
}
i=i-j;
printf("\n");
}
getch();
}

Labels