76 942
Assignments Done
Successfully Done
In June 2019

Answer to Question #33270 in C++ for nick

Question #33270
write this correctly #include <iostream>
using namespace std;
int larger (int x ,int y);
int main ()
int x,y;
cout<<"enter num1:";
cout<<"enter num2 :";
cout<<"the larger number is "<<larger(x,y);
system ("pause");
return 0 ;
int larger (int x , int y)
{int max;
if (x > y);
max = x ;
max = y ;
return max ;
Expert's answer
#include <iostream>;

using namespace std;
//prototype of function larger
int larger (int x ,int y);
//main function
int main ()
int x,y;//variable for x and y
cout<<"enter num1:";
cin>>x;//read x
cout<<"enter num2 :";
cin>>y;//read y
cout<<"the larger number is "<<larger(x,y)<<"

larger number is
system ("pause");//delay
return 0 ;

//function find larger number
int larger (int x , int y){
int max;//variable max
if (x > y){
max = x ;//set max to x
max = y ;//set max to y
return max ;//return max

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