5
Answers

Need Help With Program

Ya Boi

Ya Boi

7y
2.6k
1
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)