*️⃣ Write a program to find out greater among two numbers using returning without argument *️⃣
Anonymous:
...
Answers
Answered by
4
C++ program to find greatest among 2 nos. using inline()
C++
---------------------------------------------------
#include<iostream>
using namespace std;
inline int greatest(int a,int b)
{
int r;
r=(a>b)?a:b;
return(r);
}
int main()
{
int a,b;
cout<<"Enter 2 nos.:";
cin>>a>>b;
cout<<"Greatest no:"<<greatest(a,b);
}
---------------------------------------------------
C++
---------------------------------------------------
#include<iostream>
using namespace std;
inline int greatest(int a,int b)
{
int r;
r=(a>b)?a:b;
return(r);
}
int main()
{
int a,b;
cout<<"Enter 2 nos.:";
cin>>a>>b;
cout<<"Greatest no:"<<greatest(a,b);
}
---------------------------------------------------
Answered by
18
Here is your programm
Source Code: C Program To Find Biggest of Two Numbers using Function
#include<stdio.h>
int biggest(int, int); // function prototype.
int main()
{
int a, b;
printf("Enter 2 integer numbers\n");
scanf("%d%d", &a, &b);
// function call biggest(a, b)
Similar questions