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
*****
*****
*****..........
So far what i have is this and its not compiling.
#include <iostream>
using namespace std;
int main () {
int n;
{
cout<<"Give me a number"<<endl;
cin<<n;}
{
int i;
cout<<"Give me another number"<<endl;
cin<<i;}
{
while(n*i){
cout<<"**********"<<endl;
system("pause");
return 0;
}
}
also if you can provide an explanation to your solution i would appreciate it so that way i can better understand and learn from this as well. thank you.