Answers for "rectangle pattern in c++"

C++
0

rectangle pattern in c++

#include <iostream>
using namespace std;
int main()
{
    int col, row;
    int i,j;

    cout<< "Enter number of rows and columns: ";
    cin >> row >> col;

    for (i=1; i <=row; i++){
        for (j=1; j<=col; j++){
            cout << "*";
        }
        cout << "\n";
    }


    return 0;
}
Posted by: Guest on July-17-2021

Browse Popular Code Answers by Language