//chapter 3 number 5
//create a program that calculates and displays the area of a rectangle given the rectangle's length and width measurements in feet.
#include <iostream>
using namespace std;
int main()
{
//declare variables
double lenght = 0.0;
double width = 0.0;
double area = 0.0;
//inpute items
cout << "Enter lenght: ";
cin >> lenght;
cout << "Enter width: ";
cin >> width;
//Calculate Area
area = width * lenght
//Calculate
cout << "Your area is: " << area << endl;
return 0;
// end of main function
}
Help appreciated.
This post has been edited by liko: 24 September 2008 - 12:41 AM

New Topic/Question
Reply




MultiQuote




|