Question: (((Make sure its #include )))not stud.io please! Assignment Content Purpose: Demonstrate understanding of functions and use of parameters (both pass by reference and by value),

 (((Make sure its #include )))not stud.io please! Assignment Content Purpose: Demonstrate

(((Make sure its #include )))not stud.io please!

Assignment Content Purpose: Demonstrate understanding of functions and use of parameters (both pass by reference and by value), and return types and return values Assignment: 1. Create a function called greatestNumber. It has an int return type and takes in 2 ints as parameters. In this function compare the 2 integers given and return the greater value (or either one if they are the same). Note: this should only be a pass-byvalue on both parameters. 2. Create a function called modifyOriginal. It has a void return type and takes in a single integer value. It will take the integer argument and modify its value by multiplying it by 5 . Note: this should be pass-by-reference on the parameter. 3. Create a function called modifyCopy. It has a void return type and takes in a single integer value. It will take the integer argument and multiply it by 10 . It will then output the value to the console output (see example - the modifyCopy line is output by this function, NOT the main). Note: this is not modifying the original and the int it takes in is pass-by-value parameter. 4. Create your main function. In your main function, prompt the user for 2 integer values and store them in 2 different variables. Now call greatestNumber function with the 2 user provided integers and output the greatest number. Then call modifyOriginal with the first integer the user provided, and call modifycopy with the 2 nd variable the user provided. Finally, output the final values for both of the integer variables. Example output: (note, 4 and 7 are provided by the user) - try to replicate this output as closely as possible. Provide Integer 1:4 Provide Integer 2: 7 The greatest integer is 7. modifyCopy output is 70 . Final Integer 1 value: 20 Final Integer 2 value:7

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!