Code:
#include <iostream> using namespace std; void getLength(); void getWidth(); void getArea(); void getdisplayData(); int main() { // Get the rectangle's length. { double length; cout << "What is the rectangles length? "; cin >> length; // Get rectangles width. cout << "What is the rectangles width? "; cin >> width; } // Display the rectangle's data. { getdiplayData(getLength,getWidth, getArea); cout << "length = " << endl; cout << "width = " << endl; cout << "area = " << endl; } } return 0;
Comment