Multiple Inheritance 1

Description:

Write a program that calculates the area and perimeter of an rectangle but, to perform this program, multiple inheritance is used. Test Case 1 Input (stdin) 5.1 2.3 Expected Output 11.73 14.8 Test Case 2 Input (stdin) 1.5 2.5 Expected Output 3.75 8

Program :

#include <iostream>

using namespace std;

int main()

{

float a,b,c,d;

  cin>>a>>b;

  c=a*b;

  d=2*(a+b);

  cout<<c<<endl<<d;

return 0;

}