online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
Dig={0: '0', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: 'A', 11: 'B', 12: 'C', 13: 'D', 14: 'E', 15: 'F', 16: 'G', 17: 'H', 18: 'I', 19: 'J'} N=input("Num:") B1=int(input("FromBase:")) B2=int(input("ToBase:")) print("Base[",B1,"]:",N) #From Base B1 to Decimal DN=0 for i in range(len(N)): for fv in Dig: if Dig[fv]== N[::-1][i]: # FaceValue of the Digit DN+= fv * (B1 ** i) print("Decimal:",DN) #From Decimal to Base B2 if N == '0': BN = 0 else: BN = "" while DN > 0: BN += Dig[DN % B2] # Digit for the Value DN = int(DN / B2) print("Base[",B2,"]:",BN[::-1])

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue