public static void Main()
double subtractedAmount = 0;
double[] churchAttendance = new double[41];
Console.Write("Please enter a year from 1985 to 2025: ");
year = int.Parse(Console.ReadLine());
if (year > 2025 || year < 1985)
Console.WriteLine("Please pick a year between 1985 and 2025 (1985 and 2025 are also options).");
for (int i = 0; i < churchAttendance.Length; i++)
subtractedAmount = year2 * 0.45;
churchAttendance[i] = 30 - subtractedAmount;
Console.WriteLine("In the year " + year + ", " + churchAttendance[year2] + "% of the population attended church.");