int result = addtwonumbers(10, 20);
//output result here
result = addthreenumbers(result, 30, 40);
//output result here
Console.WriteLine("The total amount is: "+result);
int resultTwo = addfournumbers(600,600,result);
resultTwo = addfournumbers(result,600,600);
Console.WriteLine("The new total amount is: "+resultTwo);
int resultThree = addfivenumbers(1000, 1000, result, resultTwo);
resultThree = addfivenumbers(1000, 1000, result, resultTwo);
Console.WriteLine("The newest total is now: "+resultThree);
}
public static int addtwonumbers(int val1, int val2)
{
return val1 + val2;
}
public static int addthreenumbers(int val1, int val2, int result)
{
return val1 + val2 + result;
}
public static int addfournumbers(int val1, int val2, int result)
{
return val1 + val2 + result;
}
public static int addfivenumbers(int val1,int val2,int result,int resultTwo)
{
return val1 + val2 + result + resultTwo;