#include<iostream>
using namespace std;
class subtraction{
private:
int first;
int second;
public:
subtraction(){
first = 0;
second = 0 ;
}
void get_numbers(int a, int b){
cout<<"Enter the first number:\n";
cin>>a;
cout<<"Enter the second number:\n";
cin>>b;
first = a;
second = b;
}
void display(){
cout<<"The difference is: "<<first - second<<endl;
}
};
int main(){
int a, b;
subtraction c;
c.get_numbers(a,b);
c.display();
}
Comments
Leave a comment