I'm trying to create a program that will ask for your name and age and then say something like "Hi "Name" you have "years left" years left until your retierment. My problem is that i cant get the math correct, im quite new at this and cant find a solution on my own, heres my code so far:
using System;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace PensionAluHermondsUppgift1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("What is your first name?");
string a = Console.ReadLine();
Console.WriteLine("What is your last name?");
string b = Console.ReadLine();
Console.WriteLine("How old are you?");
string c = Console.ReadLine();
string d = 65 - c;
Console.WriteLine("HI " + a +" " + b + " you have " + d + " years left until your retierment!");
}
}
}