Код

#include "iostream"

using namespace std;

int main () {
    
    //с параметром
    for (int i=0;i<4;i++) {
        for (int j=0;j<3;j++)
            if (j>=i) cout << "$";
            else cout << "*";
        cout << endl;
    }

    cout << endl;

    int i=0;
    int j=0;
    // с предусловием
    while (i<4) {
        while (j<3) {
            if (j>=i) cout << "$";
            else cout << "*";
            j++;
        }
        i++;
        j=0;
        cout << endl;
    }

    cout << endl;

    i=0;
    j=0;
    //с постусловием

    do {
        do {
            if (j>=i) cout << "$";
            else cout << "*";
            j++;
        }
        while (j<3);
        cout << endl;
        i++;
        j=0;
    }
    while (i<4);


return 0;}