This is a simple program that prints a reverse pyramid using the C++ programming language. The pyramid is created using the do-while loop.
#include <iostream>
#include <cstdlib>
#define MAX 10
using namespace std;
int main(int argc, char const *argv[])
{
int x, y = MAX;
do
{
x = 0;
do
{
cout << "*";
x++;
} while(x <= y);
cout << endl;
y--;
} while(y >= 0);
cin.get();
return 0;
}