Hi I have this code with a function that outputs a square filled with the given char but for the
square(4);
I want it to just output a square like this
****
****
****
****
How would I do this without changing the function definition or using another function definition?
#include<iostream>
using namespace std;
void square(unsigned a, char b);
int main(){
square(4, 'W');
square(4);
system("pause");
}
void square(unsigned a, char b){
for(unsigned i = 0; i< a; ++i){
for(unsigned j = 0; j< a; ++j)
cout << b;
cout << endl; }
}