#include<iostream.h>
inline float mul(float x,float y)
{
return(x*y);
}
inline double div(double p,double q)
{
return(p/q);
}
int main( )
{
float a = 12.345;
float b = 9.82;
cout<<mul(a,b)<<endl;
cout<<div(a,b)<<endl;
return 0;
}
Output:
121.228
1.25713
Click here to read about Inline Functions
No comments:
Post a Comment