static int GetAge(string name)
Console.WriteLine("Hello " + name + ", How old are you?");
userAge = int.Parse(Console.ReadLine());
Console.WriteLine("Hello, what is your name?");
userName = Console.ReadLine();
static void AgeCheck (int userAge)
Console.WriteLine("Your old enough to vote");
Console.WriteLine("Your old enough to rent a car");
Console.WriteLine("your not an adult yet");
static void Main(string[] args)
ageofUser = GetAge(nameofUser);