Instructions: Create a triangle from the top down, putting an equal amount of space on each side of the dollar signs. With 1 dollar sign on the first line, 3 dollar signs on the second, and 5 on the third.DIAGRAM: (spaces / 2) (dollars) (spaces / 2)CODE: for (dollars = 1, spaces = 4, counter = 0; counter < 3; dollars += 2, spaces -= 2, counter++) { for (i = 0; i < (spaces / 2); i++) { cout << " "; } for (i = 0; i < dollars; i++) { cout << "$"; } for (i = 0; i < (spaces / 2); i++) { cout << " "; } cout << endl; }