I have been told to ask the user to input how many rows and columns for a rectangle they would like to print and in what symbol they want it. I am unaware as to how to do this and all my google searching only got me as far as printing one row. Directions dictate that the rows should be 3 and the columns should be 7 with the character '$'. I'm still a beginner so please go easy on me. This is what I have:
#include <iostream>
#include <iomanip>
using namespace std;
void PrintChar(int row = 5, int column = 10, char symbol = '*');
int main()
{
int rows, columns;
char symbol;
cout << "How many rows and columns do you want, and with what symbol (default is *) ?" << endl;
cin >> rows >> columns >> symbol;
PrintChar(rows, columns, symbol);
}
void PrintChar(int row, int column, char symbol)
{
for (int y = 1; y <= column; y++)
{
cout << symbol;
}
That prints out a full line of the symbol and that's where my thinking stops. If you could help me with the final rows, that would be greatly appreciated.