harde 0 Newbie Poster

Hi guys, So I write this program so far..


1 //exercise15.cpp - displays a pattern of asterisks
2 //Created/revised by <harde>
3
4 #include <iostream>
5 using namespace std;
6
7 int main()
8 {
9 for (int outer = 2; outer < 11; outer += 2)
10 {
11 for (int nested = 1; nested <= outer; nested += 1)
12 cout << '*';
13 //end for
14 cout << endl;
15 } //end for
16
17 system("pause");
18 return 0;
19 } //end of main function

Next is..
MOdifying the program on top ^ to this..


The modified program will allow the user to specify the outer loop’s
ending value and its increment value. The ending value determines
the maximum number of asterisks to display. The increment value
determines the number of asterisks to repeat.


Test the program by entering the
numbers 4 and 1 as the maximum number of asterisks and increment
value, respectively. The program should display four rows
of asterisks as follows: one asterisk, two asterisks, three asterisks,
and four asterisks.


Im so new in all this.. pleaseee helpp !!

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.