public string ToHex() { var octaToDecimal = ToDecimal(); var convert = new DecimalSystem(octaToDecimal); return(convert.ToHex()); }
public string ToOcta() { var binaryToDecimal = ToDecimal(); var convert = new DecimalSystem(binaryToDecimal); return(convert.ToOcta()); }
private static void Main(string[] args) { DecimalSystem newDec = new DecimalSystem("8271"); BinarySystem newBinary = new BinarySystem("10101010"); OctaSystem newOcta = new OctaSystem("0123"); string ans; bool flag = true; while (flag) { Console.Write("Please enter a number in any base: "); ans = Console.ReadLine(); Show(ans); do { Console.Write("Do you want to continue(y/n): "); ans = Console.ReadLine(); } while (ans != "y" && ans != "n"); if (askUserForContinue(ans)) { Console.Clear(); continue; } else { flag = false; } } Console.WriteLine((int)'A'); }
public string ToDecimal() { var convert = new DecimalSystem(); return(convert.AnySystemToDecimal(this.octa, 8)); }
public string ToDecimal() { var convert = new DecimalSystem(); return(convert.AnySystemToDecimal(this.binary, 2)); }