C++ program to find largest of three number using inline function || Executable cpp file download link

find largest of three number

C++ program to find the largest number among the three numbers using inline function is the program to find the largest element of three numbers.

For Ex: 10 4 18 largest number among three is 18

program to find the largest of three numbers

Program:

#include<iostream.h>
using namespace std;
inline int largest(int a, int b,int c)
{
return ((a>b)&&(a>c)?a:(b>c)?b:c);
}
int main()
{
cout<<"largestt"<<largest(3,4,5);
return 0;
}

Output:

CPP file download link:

Leave a Comment