Answer to Question #284419 in C++ for Migs

Question #284419

Write a program that will display the following pattern, given the value of n and m. Example if n = 5,and m=6, output


1
Expert's answer
2022-01-03T10:46:48-0500
#include <iostream>


using namespace std;


int main()
{
    int n, m;
    cout << "Enter N = ";
    cin >> n;
    cout << "Enter M = ";
    cin >> m;
    for (int i = 0; i < m; i++)
    {


        for (int j = 0; j < n; j++)


            cout << "*";


        cout << endl;
    }
    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