Program -
#include<iostream.h>
Output :
#include<iostream.h>
#include<conio.h>
inline float
mul(float x,float y)
{
return(x*y);
}
inline float
add(float p,float q)
{
return(p+q);
}
void main()
{
clrscr();
float a=12.2;
float b= 1.2;
cout<<"\n
mul="<<mul(a,b);
cout<<"\n
add="<<add(a,b);
getch();
}
Output :
mul=14.64
add=13.4
0 comments:
Post a Comment