Back to Problem Solutions forum
In the problem description, it says:
- binary could be written as `0b1000101` or `1000101h`;
but it should be "b" and not "h" for that last character.
It also says:
- values consisting of digits `0-9` are considered decimals.
but the corrector does not interpret "012345" as decimal (it leaves it as-is...). Since it is a value consisting of the digits 0-9 (although with a leading zero), it is not entirely clear what we should do with those.
> but it should be "b" and not "h".
Oh, thanks! I should be more attentive why copy-pasting...
> but the corrector does not interpret "012345"
I'm sorry but what is "corrector" in this context? As far as I remember C/C++ compilers use leading zero to
specify the value is octal and if it contains wrong digits (like 0189
) the error is generated.
Within this task I think it 0189
should not be recognized, while 012345
should be converted to oct
... If it does not behave so, I'm afraid it is a bug... But now it looks like working for 012345
for me...
Probably I should improve problem statement also.
Sorry, I meant something like "09898"... not octal. My confusion was that "0189" is a decimal value consisting of the digits 0-9. Maybe specifying "not beginning with "0" would clarify?
The "corrector" is the part of the site that checks our solutions. :)
The last part that is not entirely clear is that the "b", "x" and "h" characters are not case-sensitive. Since the description specifies that the hex digits are not case sensitive, it gives the impression that others are. It might be clearer to state that nothing is case-sensitive.
Thanks a lot! I've tried to improve problem statement on both points!
Sorry for confusion, please :)
I just read the revised version and it seems much clearer to me now.