Write a program that asks the user for 2 numbers: the width and the height. The program prints a box of asterisks of that width and height.
For example, if the user types in 5 and 3, the program outputs
I cant figure out how to get it to print the boxes instead of the numbers. this is what i have.
using namespace std;
int main ()
cout<<"Give me a number"<<endl;
cout<<"Give me another number"<<endl;
It's printing a number becuase n*i is an expression.
You need to create a pair of nested for loops. The outter one for rows and the inner one for columns. Inside the inner loop, you will want to print one asterisk for each column. You will also want to print an endl after each row.
PLEASE USE CODE TAGS (the <> formatting button) when posting code. It makes your code easier to read and it also makes it easier to respond to you post.