/* Name: Perez, Mark Ryan C. BSIT - 1207_CCS1203 */ #include #include using namespace std; int main() { int nr; string ta; do { system("cls"); cout << "__________________________\n\n"; cout << "Enter number of rows: "; cin >> nr; cin.ignore(numeric_limits::max(), '\n'); for (int x = 1; x <= nr; x++) { for (int z = 1; z <= x; z++) { cout << "*"; } cout << "\n"; } cout << "\nDo want to try again?: "; getline(cin, ta); cout << "__________________________\n\n"; } while (ta.compare("Yes") == 0 || ta.compare("yes") == 0 || ta.compare("YES") == 0 || ta.compare("y") == 0 || ta.compare("Y") == 0); }