+ 1
decimal to hexa and binary
plz tell why the hell that question mark symbol is coming before hexa in output.like input 23 then number in hexa will show ?17. https://code.sololearn.com/c8cql1kkNvq6/?ref=app
7 Respuestas
+ 2
now this is right code:
https://code.sololearn.com/chDEz1Ok9Z1I/?ref=app
+ 4
Line 19:
Decrease <y> before loop begins. <y> was one char ahead. Did you know we can print numbers in hexadecimal by using %x format specifier?
Your binary result was not corect also because of similar issue, you need to decrease <x> before loop begins.
+ 2
Ipang thanks bro u are awesome
+ 2
Ipang is there any format specifier for binary bro
+ 1
No bro, not that I know of ...
0
Looks like its typecasting the int as a char, formatting should help
0
there is little error Ipang in your answer.only by putting x-- in starting of loop we cant get right output.see the right code i have written. thanks man for answering.