//********************************************************************** // Rectangle program 2a // This program calculates the area of a rectangle with user input // for the dimensions //********************************************************************** #include using namespace std; int main() { int base; //the base of the rectangle int height; //the height of the rectangle int area; //the area of the rectangle //read values to base and height cout << "Enter values for base and height: "; cin >> base >> height; //calculate the area area = base*height; //output the result cout << "The area is " << area << endl; return 0; }