Ya Boi

Ya Boi

  • NA
  • 27
  • 8.2k

Need Help With Program

Nov 11 2017 7:32 PM
I need a program whose Main() method declares three integers named firstInt, middleInt, and lastInt.
 

Assign the following values to the integers:

  • 23 to firstInt
  • 45 to middleInt
  • 67 to lastInt

Then display the values and pass them to a method named Reverse that accepts them as reference variables, places the first value in the lastIntvariable, and places the last value in the firstInt variable.

In the Main() method, display the three variables again, demonstrating that their positions have been reversed. I have this:

using static System.Console;
class Reverse3
{
static void Main()
{
 
 
and I wrote the other method:
 
public static void Reverse(ref int a, ref int b, ref int c)
{
}
}
 
I am completely lost on what I need to put in them. 

Answers (5)