0

Explain this program please?

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sample { class Program { 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(6)); Console.WriteLine(Pow(3, 4)); } } }

6th Nov 2019, 5:14 PM
Minhaj Haider
Minhaj Haider - avatar
1 Answer