Cost of Painting

Description:

Vasu needs her home painted at cost of Rs. 5 per sq.feet. She needs to get perimeter value to find the cost of painting the house. (Hint: Class C1 gets length and breadth as input which is used by class C2 derived from C1. C2 calculates perimeter of the house. C3 derived from c2 displays the cost of painting the house) Test Case 1 Input (stdin) 20 30 Expected Output 500 Test Case 2 Input (stdin) 5.5 6.7 Expected Output 122

Program :

#include <iostream>

using namespace std;

int main()

{

float a,b,c;

  cin>>a>>b;

  c=(a+b)*10;

  cout<<c;

return 0;

}