#include <iostream>
using namespace std;
int main()
{
int h,v,num;
cout<<"Give a value for length ";
cin>>v;
cout<<"Give a value for width ";
cin>>h;
for(int i= 0;i<=v;i++)
{
for(int r=0;r<=h;r++)
{
cout<<"*";
}
cout<<endl;
}
return 0;
}
how do i change this code to accept two numbers from the user and print it as the different length and widtth? it has to be a for loop as well.[code]
Yea i wasnt planning on using this code. Just used it as an example cause i had nothing on me at the moment. I have another code on my other computer. but it just gave me an infinite loop or just didnt compile anything