kuruku

PrintAgeAfterTenYears

Apr 14th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. using System;
  2.  
  3. //Write a program to read your age from the console and print how old you will be after 10 years.
  4.  
  5. class PrintAgeAfterTenYears
  6. {
  7.     static void Main()
  8.     {
  9.         Console.Write("Age: ");
  10.         int age = int.Parse(Console.ReadLine());
  11.         Console.WriteLine("Your age after 10 years is {0} years", age + 10);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment