Aim: Write a program of multipication using inline function
class Multiply
{
int x,y;
public:
void getdata();
inline calculate(int a,int b)
{
return(a*b);
}
void display();
};
void Multiply::getdata()
{
cout<<"Enter the two numbers"<
cin>>x>>y;
}
void Multiply::display()
{
cout<<"Multiplication of "<
cout<
}
int main()
{
clrscr();
Multiply m;
m.getdata();
m.display();
getch();
}
Output:
Enter the two numbers
6 5
Multiplication of 6 and 5=30