#include "stdafx.h" #include <iostream> using namespace std; int main () { int M, row = 0, column = 0, space = 0; cout << "Please Enter The Number Of Rows to Print Stars in Descending Order: "; cin >> M; while (row < M) { while (column <= row) { cout << "*"; while (space <= M - 1) { cout << " "; space++; } column++; } cout << '\n'; row++; } return 0; }
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)