the following exercise is from a book im learning from...
Write two programs that each a table of the binary, octal, and hexadecimal equivalents of the decimal numbers in the range of 1-256
a) for the first program, print the results to the console without using any string formats.
b) for the second program, print the results to the console using both the deciamal and hexadecimal string formats (there are no formats for binary and octal in C#).
i have completed the octal conversion for the first program ...
this works, i guess the code could be more efficient, with regards to the binary and hex conversions i was hoping to get some help with the algorithm or at least point me in the right direction please
static void Main(string args)
int octal = 1;
for(int dec=1; dec<=256; dec++, octal++)
Console.Write(dec + "\t\t");//decimal
octal += 2;
case 64: octal = 100;
case 128: octal = 200;
case 192: octal = 300;
case 256: octal = 400;