I need to create a rectangle using for loop and a nested for loop
So far the code I've got is:
#include<iostream>
using namespace std;
int main()
{
int row, i, width, spaces;
cout <<"Enter the number of rows: ";
cin >> row;
cout <<"Enter the rectangle width: ";
cin >> width;
i=0;
for(i=0; i<row; i++)
cout << "O";
cout << endl;
for(i=0; i<width; i++)
cout << "O"<< endl;
system("pause");
return 0;
}