Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Test
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Console.WriteLine("Въведете годините си: "); // Това го премахваш
- string age = Console.ReadLine();
- DateTime myBirthDay = DateTime.Parse(age);
- //int ageNow = int.Parse(age); // Това ще ти връща формат ексепшън
- DateTime today = DateTime.Now;
- // Разгледай възможностите на myBirthDay.Day ... myBirthDay.Month ... myBirthDay.Year .... респективно today.{properties}
- //DateTime future = today.AddYears(10);
- //DateTime futureYear = future.AddYears(ageNow);
- //int futureAge = futureYear.Year - today.Year;
- //Console.WriteLine("След 10 години, ще сте на: " + "\n" + futureAge);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement