using System.Collections.Generic;
public static IEnumerable<int> ComputePower(int number, int exponent)
while (exponentNum < exponent)
yield return numberResult;
public static void Main()
foreach (int value in ComputePower(2, 17))
Console.WriteLine("2^" + (exponent++).ToString() +"="+ value);