Methods
Methods
modifier1 modifier2 type Name ( parameter 1, parameter 2 ...)
{
//code
return value;
}public static int Multiply(int a, int b)
{
//code...
return a * b;
}Exercise
Last updated
modifier1 modifier2 type Name ( parameter 1, parameter 2 ...)
{
//code
return value;
}public static int Multiply(int a, int b)
{
//code...
return a * b;
}Last updated
2
3
5using System;
public class Methods
{
public static void Main()
{
int x = Convert.ToInt32(Console.ReadLine());
int y = Convert.ToInt32(Console.ReadLine());
int a = Add(x,y);
Console.WriteLine(a);
}
//your code below:
}