Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[C#] I need to accept two integer parameters and return value of larger integer Here's the code: class Return_Values { public void RunExercise() { Console.WriteLine(First

[C#] I need to accept two integer parameters and return value of larger integer

Here's the code:

class Return_Values { public void RunExercise() { Console.WriteLine("First value?"); int firstNumber = Int32.Parse(Console.ReadLine()); Console.WriteLine("Second value?"); int secondNumber = Int32.Parse(Console.ReadLine()); int theMax; Max m = new Max(); // // TODO: YOU MUST CHANGE THE METHOD DEFINITION OF returnMax, // // AND THIS NEXT LINE OF CODE, // // SO THAT firstNumber AND secondNumber ARE PASSED INTO THE METHOD AS PARAMETERS, // // AND THEN STORE THE RESULTING RETURN VALUE INTO theMax. m.returnMax(); // you'll need to change this line // Don't forget to assign the return value to theMax! //Console.WriteLine("The max of {0} and {1} is {2}", firstNumber, secondNumber, theMax); return; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Connect with your audience

Answered: 1 week ago