AIM:
To write a C++ program to perform arithmetic operation using inline function.
ALGORITHM:
STEP 1: Start the program.
STEP 2: Declare and define inline functions ie. ‘add()’,’sub()’,’mul()’,’div()’.
STEP 3: Assign the values of a & b.
STEP 4: Call the inline functions in main function.
STEP 5: Stop the program.
PROGRAM CODE:
#include<iostream.h>
#include<conio.h>
inline float add(float x,float y)
{ return(x+y);
}
inline float sub(float s,float t)
{ return(s-t);
}
inline float mul(float p,float q)
{ return(p*q);
}
inline float div(float c,float d)
{ return(c/d);
}
void main()
{ clrscr(); float a=4.5; float b=7.8; cout<<"n ADDITION="; cout<<add(a,b); cout<<"n SUBTRACTION="; cout<<sub(a,b); cout<<"n MULTIPLICATION="; cout<<mul(a,b); cout<<"n DIVISION="; cout<<div(a,b); getch();
}
OUTPUT:

RESULT:
Thus the C++ program for performing arithmetic operation using inline function is written and executed successfully.

![How to Turn Off Automatic Brightness on Ubuntu [Quick Tip]](https://linuxpunx.com.au/wp-content/uploads/2021/03/how-to-turn-off-automatic-brightness-on-ubuntu-quick-tip-768x257.png)

![How to Record Your Screen with VLC [For Fun]](https://linuxpunx.com.au/wp-content/uploads/2023/10/how-to-record-your-screen-with-vlc-for-fun-25-768x432.png)

