72 517
Assignments Done
Successfully Done
In April 2019

Answer to Question #16431 in C++ for arif hussain

Question #16431
Q#2 Write a program to pass two numbers as arguments to the function body, compare the numbers and print the greater number on the screen
Expert's answer
using namespace std;

int a, b;

int comparison(int a, int b){
if (a<b) return b;
& else return a;

void main(){
cout<<"enter the 1st number: ";
cout<<"enter the 2nd number: ";
cout<<"the greater number is "<<comparison(a,b)<<"\n";

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions