12345678910111213141516171819202122
#include <iostream> using namespace std; int main() { char a; int b, c, d; cout << "designate sign"; cin >> a; cout << "designate height"; cin >> b; for (c = 1; c <= b; c++) { { for (d = 1; d <= c; d++) cout << a; } cout << "\n"; } return 0; }
1234567
for (c = 1; c <= b; c++) { { for (d = 1; d <= c; d++) cout << a; } cout << "\n"; }
1234
for (c = b; c > 0; c--) { for (d = 1; d <= c; d++) cout << a; cout << "\n"; }