Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class AgeAfter10Years
- {
- static void Main(string[] args)
- {
- Console.Write("Enter your birth date: ");
- DateTime BirthDay = DateTime.Parse(Console.ReadLine());
- int age = (int)((DateTime.Now - BirthDay).TotalDays / 365.242199);
- Console.WriteLine("You are " + age + " year(s) old");
- Console.WriteLine("After ten years you will be at the age of " + (age + 10));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement