Advertisement
MilenaSP

Untitled

Jan 24th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace AgeIn10Yrs
  8. {
  9. //Write a program to read your age from the console and print how old you will be after 10 years.
  10.  
  11. class FutureAge
  12. {
  13. static void Main(string[] args)
  14. {
  15. Console.Write("My current age is ");
  16. string a = Console.ReadLine();
  17. int futureAge = int.Parse(a);
  18. Console.WriteLine("My age in 10 years will be {0}", (futureAge + 10));
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement