C++ Program To Print Flip Pattern Of Half Pyramid Using *
Here our task is to print the required pattern without actually writing it manually. We will see how to do this for a half pyramid pattern. The simplest case will be to make the pattern using * only.
Program to print the Flip pattern of Half Pyramid using *
using namespace std;
cout << "Enter number of rows: ";
cin >> rows;
for(int i = rows; i >= 1; --i)
for(int j = 1; j <= i; ++j)
cout << "* ";
cout << endl;
Enter number of rows: 5
* * * * *
* * * *
* * *
As for the implementation part, we can use alphabets, or any other symbol for the pattern but the general will remain the same for always.