Question: [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

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!