/*-------
Signature: main: void -> int
Purpose: to provide an interactive front end to the
function rect_area -- it will ask the user to
enter a rectangle's length and width, and it
will print the resulting rectangle area to the screen.
Examples: if, when this is run, when prompted, the user enters
the following length:
12
and the following width:
5
...then this prints to the screen:
Rectangle's area: 60
if, when this is run, when prompted, the user enters
the following length:
10
and the following width:
15
...then this prints to the screen:
Rectangle's area: 150
by: Sharon Tuttle
last modified: 2016-11-04
--------*/
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include "rect_area.h"
using namespace std;
int main()
{
cout << boolalpha;
double desired_length;
double desired_width;
// ask the user to enter a length and a width, and
// read in what they type
cout << "Type the rectangle's length, followed by enter: ";
cin >> desired_length;
cout << "Type the rectangle's width, followed by enter: ";
cin >> desired_width;
// compute the rectangle area and print it to the screen
cout << "Rectangle's area: "
<< rect_area(desired_length, desired_width)
<< endl;
return EXIT_SUCCESS;
}