cout << "Enter length and width of the room: "; cin >> length >> width; area = length * width; perim = 2 * length + 2 * width; cout << "the room is " << length << " by " << width << endl; cout << "the area is " << area << endl; cout << "the perimeter is " << perim << endl;
float length, width; float area; float perim;
cout << "Enter length and width of the room: "; cin >> length >> width; cout << "the room is " << length << " by " << width << endl; perim = 2 * length + 2 * width; cout << "the perimeter is " << perim << endl; area = length * width; cout << "the area is " << area << endl;
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2002