Sum of Two Numbers

Description:

Accept these two numbers from the user in base class and display the sum of these two numbers in derived class. C++ program to add two numbers using single inheritance Test Case 1 Input (stdin) 5 2 Expected Output 7 Test Case 2 Input (stdin) 120 150 Expected Output 270

Program :

#include <iostream>

using namespace std;

int main()

{

   int a,c,b;

   cin>>a;

  cin>>b;

  c=a+b;

  cout<<c;

return 0;

}