For hex in C or Java (C does not support binary, which is a shame) it would beCan I have a hint? Let's say we want to convert to hexadecimal instead. Will we still get a value of zero for C? The syntax makes sense, in COBOL it would be similar, (C = X#5 / X#9 * (F - X#20).
C = 0x5 / 0x9 * (F - 0x20);
And, yes, the the value for C will still be zero.
Here's a couple of hints.
Let's assume that C and F are floating point variables. In most languages (don't know about COBOL) it would still evaluate to zero. However, if it is rewritten slightly as
C = 0x5 * (F - 0x20) / 0x9;
it will evaluate as you would like it to.