Shapes

Description:

Vasu needs to find the area of different shapes. She created a base class which has multiple functions to calculate area for different shapes. While she created necessary functions like input(), output() to get input to be used by base class and displays the output. (Hint: input(), output() are at same level) Test Case 1 Input (stdin) 5 6 Expected Output 30 15 Test Case 2 Input (stdin) 10 5 Expected Output 50 25

Program :

#include <iostream>

using namespace std;

int main()

{

   int a,c,d,b;

  cin>>a;

  cin>>b;

  c= a*b;

  d= c/2;

  cout<<c<<"\n";

  cout<<d;

return 0;

}