find largest of three number
C++ program to find largest number among the three numbers using inline function is the program to find largest element of three numbers.
For Ex : 10 4 18 largest number among three is 18
program to find largest of three numbers
C++ program to find largest number among the three numbers using inline function is the program to find largest element of three numbers.
For Ex : 10 4 18 largest number among three is 18
program to find 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<<"largest\t"<<largest(3,4,5);
return 0;
}
Output:
cpp file download link:
No comments:
Post a Comment