using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bai_10_sgkt36
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[1000];
int n;
int i = 0;
Console.Write("nhap so muon doi co so sang he co so 16:");
n = int.Parse(Console.ReadLine());
while (n != 0)
{
a[i] = n %16;
n = n / 16;
i++;
}
for (int j = i; j >= 0; j--)
Console.Write(a[j] + "\t");
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bai_10_sgkt36
{
class Program
{
static void Main(string[] args)
{
int[] a = new int[1000];
int n;
int i = 0;
Console.Write("nhap so muon doi co so sang he co so 16:");
n = int.Parse(Console.ReadLine());
while (n != 0)
{
a[i] = n %16;
n = n / 16;
i++;
}
for (int j = i; j >= 0; j--)
Console.Write(a[j] + "\t");
Console.ReadKey();
}
}
}