#include <iostream>#include <iomanip>using namespace std;int main(){ //Dispaly the first pattern cout << "Pattern A" << endl; const char plus = '+'; int a = 10; int x = 0; while (a > 0) { x = a; while (x < 0) { cout << plus; x = x - 1; } a = a - 1; cout << endl; }return 0;}
while (x < 0) { cout << plus; x = x - 1; }
while (x > 0) { cout << plus; x = x - 1; }