Question: So I have this C++ project that is supposed to diplay like this: I can't seem to get the bottom one to work. This is

So I have this C++ project that is supposed to diplay like this:

So I have this C++ project that is supposed to diplay like

I can't seem to get the bottom one to work.

This is what I have so far

#include

#include

using namespace std;

void patternOne(int);

void patternTwo(int);

void patternThree(int);

int main() {

int numberOfRows = 5;

cout

patternOne(numberOfRows);

cout

patternTwo(numberOfRows);

cout

patternThree(numberOfRows);

return 0;

}

//patternOne function prototype

void patternOne(int rows) {

for (int row = 1; row

{

for (int count = 1; count

{

cout

}

cout

}

}

//patternTwo function prototype

void patternTwo(int rows) {

for (int row = rows; row >= 1; row--)

{

for (int count = row; count >= 1; count--)

{

cout

}

cout

}

}

//patternThree function prototype

void patternThree(int rows) {

for (int row = rows; row >= 1; rows--)

{

for (row = 0; row

{

cout

for (int count = row; count >= 1; count--)

{

cout

}

cout

}

}

}

1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 Pattern 3 1 2 3 4 5 1 2 3 4 1 2 3 1 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!