Program to print Reverse Triangle
//print the reverse triangle
#include <iostream.h>
#include <conio.h>
void main()
{
int i, n;
cout << "Enter the value of n : ";
cin >> n;
cout << "\n\n";
for (i = 0; i < n; i++)
{
for (int j = i; j < n; j++)
cout << "* ";
cout << "\n";
}
getch();
}
Output :
No comments:
Post a Comment