0

Help for getting two inputs for a method c#

How Do I get two inputs for this method? it gives me Error CS1503 static int Pow(int x, int y = 2) { int result = 1; for (int i = 0; i < y; i++) { result *= x; } return result; } static void Main(string[] args) { Console.WriteLine(Pow (Convert.ToInt32(Console.ReadLine())), Convert.ToInt32(Console.ReadLine())); }

8th Dec 2017, 11:38 PM
Thrap
Thrap - avatar
1 Answer