using
System;using
System.Collections.Generic;using
System.Text;using
System.Collections;
namespace
ConsoleApplication1{
class Program{
static void Main(string[] args){
Stack s = new Stack(); Console.Write("Enter One Number"); int n = Convert.ToInt16(Console.ReadLine()); while (n > 0){
int r = n % 16; if (r <= 9)s.Push(r.ToString());
else { switch (r){
case 10:s.Push(
"A"); break; case 11:s.Push(
"B"); break; case 12:s.Push(
"C"); break; case 13:s.Push(
"D"); break; case 14:s.Push(
"E"); break; case 15:s.Push(
"F");; break;}
}
n = n / 16;
}
while (s.Count > 0) Console.Write("{0}\t", s.Pop()); Console.ReadLine();}
}
}