public static void Main()
Console.Write("Pascal's Triangle\nEnter a row number: ");
if (!int.TryParse(Console.ReadLine(), out input))
Console.Write("Input is not a number");
Console.Write("Input number less than zero is not allowed.");
Console.Write("Input number greater than 25 is not allowed.");
for (int a = input; a>0; a--)
sumBefore = sumBefore + (int) Math.Pow(2, a - 1);
Console.WriteLine("The sum of numbers above row " + input + " is " + sumBefore);
Console.Write("The sum of numbers above row " + (input+1) + " is " + Math.Pow(2, input + 1));