You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
623 B
C#

/*
* C# Program to Covert HexaDecimal Number to Decimal
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string Input;
Console.WriteLine("Enter a Hexadecimal Number :");
Input = Console.ReadLine();
int Output = int.Parse(Input, System.Globalization.NumberStyles.HexNumber);
Console.WriteLine("The Decimal value is " + Output);
Console.Read();
}
}
}
/*
Enter a HexaDecimal Number : ABC
The Decimal value is : 2748