Answer to Question #270931 in C++ for A lawal

Question #270931

C++ Programs to print integers Pattern


1
Expert's answer
2021-11-24T13:48:30-0500
#include <iostream>
using namespace std;


void intPattern(int n)
{
    for (int i = 0; i < n; i++) {


        for (int j = 0; j <= i; j++) {


            cout << "* ";
        }


        cout << endl;
    }
}


int main()
{
    int n = 5;
    intPattern(n);
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS