taks kamps

taks kamps

  • NA
  • 39
  • 6.8k

return value from a method

Dec 14 2018 5:30 PM
Call the Add method passing in i and j. Assign the result of the method to iPlusj... code below of what i have done so far
 
using System;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
int i = 5; int j = 2;
int iPlusj;

Add();
iPlusj = 7;

Console.WriteLine(iPlusj);
}

static int Add(int pLHS, int pRHS)
{
return pLHS + pRHS;
}
}
}

Answers (1)