I'm writing a rectangle program and need a little help.
I need the user to enter the names, lengths and widths of four(4) rectangles. What is the best and easiest way for the user to enter all of this information?
I could ask the user for each piece of info separately, but that is clunky and time consuming. Any ideas would be greatly appreciated.
int setLength(int len[])
{
int count;
int num = 4;
cout << "Enter the lengths of 4 rectangles:\n";
for (count = 0; count < num; count++)
{
cout << "Rectangle " << count + 1 << ": ";
cin >> len[count];
}
return len[count];
}
This is what I will do. Sorry to give you the answer I should of provide you advice as it was a minor error but see if you can find any other ways to fix it. Good Luck!