VelizarAvramov

04. Variable in Hex Format

Nov 15th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3.  
  4. namespace Demo
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string input = Console.ReadLine();
  11.             int output = Convert.ToInt32(input, 16);
  12.             string result = Convert.ToInt32(input, 16).ToString();
  13.             //Console.WriteLine(result);
  14.             Console.WriteLine(output);
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment