using System;
//A program to throw a custom error message if the age of user is under 18
public class Program
{
public static void Main()
int age = 17;
if (age < 18)
throw new Exception("Not old enough to vote");
}
else
Console.WriteLine("You can vote");