float length, width, area, perimeter;
cout << "Input the length of a rectangle: ";
cin >> length;
cout << "Input the width of a rectangle: ";
cin >> width;
area = length * width;
cout << "The area of a rectangle is " << area << endl;
perimeter = length + length + width + width; // also > 2*(length + width)
cout << "The perimeter of a rectangle is " << perimeter << endl;