Area of square and circle

Description:

Write a program to find the area of square and circle with using pure virtual function Test Case 1 Input (stdin) 4 5 Expected Output Area of square: 16 Area of circle: 78.5 Test Case 2 Input (stdin) 7 4 Expected Output Area of square: 49 Area of circle: 50.24

Program :

#include <iostream>

using namespace std;

int main()

{

  int a,b,c;

  float d;

  cin >>a;

  cin>>b;

  c=a*a;

  d= 3.14*b*b;

  cout<<"Area of square: "<<c<<"\n";

  cout<<"Area of circle: "<<d;

return 0;

}