//********************************************************************** // Rectangle program 2 // 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 a value for base: "; cin >> base; cout << "Enter a value for height: "; cin >> height; //calculate the area area = base*height; //output the result cout << "The area is " << area << endl; return 0; }