using System;
public class BinHex
{
public static void Main()
{
int n;
do
{
Console.Write("Enter a number:");
n = Convert.ToInt32(Console.ReadLine());
if (n != 0)
{
Console.Write("Hexadecimal: ");
Console.WriteLine(Convert.ToString(n, 16));
Console.Write("Binary: ");
Console.WriteLine(Convert.ToString(n, 2));
}
}
while (n != 0);
}
}