heres what i have but it wont paste the letters to the corresponding digit
public String Hex(int z)
{
num=z;
while(num>=1)
{
z = num % 16;
hex = z + hex;
num /= 16;
switch (z)
{
case 10: hex ="a";
break;
case 11: hex ="b";
break;
case 12: hex ="c";
break;
case 13: hex ="d";
break;
case 14: hex ="e";
break;
case 15: hex ="f";
break;
default: hex=hex;
break;
}
}
can anyone fix this code to do the conversion?