Square and cube

Description:

Calculates square and cube of given number using hierarchical inheritance Test Case 1 Input (stdin) 10 200 Expected Output Square is: 100 Cube is: 8000000 Test Case 2 Input (stdin) 4 5 Expected Output Square is: 16 Cube is: 125

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b,c,d;

  cin>>a>>b;

  c=a*a;

  d=b*b*b;

  cout<<"Square is: "<<c<<endl;

  cout<<"Cube is: "<<d;

return 0;

}