Question: Create a C + + program called lab 1 _ 1 . cpp that reads three numbers from a user. Then it calls a function

Create a C++ program called lab1_1.cpp that reads three numbers from a user. Then it calls a function named find_max(), which takes three integers are arguments, finds the largest of the three numbers, and then returns the largest number. This result is finally printed onto the screen.
Here is your function prototype:
int find_max(int x, int y, int z;
Here is your main function (note you must use this main, you aren't allowed to modify it):
int main()
{
int num1, num2, num3, largest;
cout "Please enter three numbers: ";
cin num1 num2 num 3 ;
//write the statement that calls find_max() and stores
??? the value returned in largest
cout "The largest number is " largest ". In";
return ;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!