You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespace AgeAfterTenYears
{
class AgeAfterTenYears
{
static void Main()
{
Console.WriteLine("Type Your Born Date (Example: 1995):");
string line = Console.ReadLine(); // Read string from console
int value;
if (int.TryParse(line, out value)) // Try to parse the string as an integer
{
Console.WriteLine("Your Age: " + (2014 - value)); // Multiply the integer and display it
Console.Write("Your Age After Ten Years: ");
Console.WriteLine(2014 - value + 10); // Multiply the integer and display it
}
else
{
Console.WriteLine("Not an integer!");
}
}
}
}
The text was updated successfully, but these errors were encountered:
using System;
namespace AgeAfterTenYears
{
class AgeAfterTenYears
{
static void Main()
{
Console.WriteLine("Type Your Born Date (Example: 1995):");
string line = Console.ReadLine(); // Read string from console
int value;
if (int.TryParse(line, out value)) // Try to parse the string as an integer
{
}
The text was updated successfully, but these errors were encountered: