using System; class Class1 { static void Main(string[] args) { string s; int x = 2, y = 4; double[] numArray = {12, 15, 14.5, 145.43, 200}; // format in uppercase hex Console.WriteLine( "\n\nHex (upper)\n-----------" ); foreach( double num in numArray ) { Console.Write( "0x{0:X8}\t", (int) num ); } } }