/*
INLINE FUNCTION
*/
#include<iostream>
using namespace std;
class Operation
{
int a,b;
public:
void accept();
void sum();
void sub();
void mul();
void div();
};
inline void Operation:: accept()
{
cout<<"\n\n Enter any two number: ";
cin>>a>>b;
}
inline void Operation:: sum()
{
cout<<"\n\n Sum: "<<a+b;
}
inline void Operation::sub()
{
cout<<"\n\n Subtraction: "<<a-b;
}
inline void Operation::mul()
{
cout<<"\n\n Multiplication: "<<a*b;
}
inline void Operation:: div()
{
cout<<"\n\n Division: "<<(float)a/b;
}
int main()
{
Operation o;
o.accept();
o.sum();
o.sub();
o.mul();
o.div();
return 0;
}
INLINE FUNCTION
*/
#include<iostream>
using namespace std;
class Operation
{
int a,b;
public:
void accept();
void sum();
void sub();
void mul();
void div();
};
inline void Operation:: accept()
{
cout<<"\n\n Enter any two number: ";
cin>>a>>b;
}
inline void Operation:: sum()
{
cout<<"\n\n Sum: "<<a+b;
}
inline void Operation::sub()
{
cout<<"\n\n Subtraction: "<<a-b;
}
inline void Operation::mul()
{
cout<<"\n\n Multiplication: "<<a*b;
}
inline void Operation:: div()
{
cout<<"\n\n Division: "<<(float)a/b;
}
int main()
{
Operation o;
o.accept();
o.sum();
o.sub();
o.mul();
o.div();
return 0;
}