Write a program in C++ to calculate product and division using inline function - WAY2IT

Latest Post :

Write a program in C++ to calculate product and division using inline function



Code :-

#include<iostream.h>
#include<conio.h>
inline float mul(float x, float y)
{
return (x*y);
}
inline double div(double p,double q)
{
return (p/q);
}
void main()
{
clrscr();
float a=12.345;
float b=9.82;
cout <<"product:"<< mul(a,b) << endl;
cout <<"division:"<< div(a,b) << endl;
getch();
}



Output :-