New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Help C++!!! Code does not work.
Hello! Tell me why the code does not work. Does not display the result. No mistakes. https://code.sololearn.com/c7k0XPfdKyzs/?ref=app
2 Answers
+ 6
The result of a, b and c are 5, 5 and 8 respectively.
These variables are (unsigned) chars and the values 5 and 8 are unprintable characters, so they appear invisible.
Might want to change their type to an (unsigned)int instead of a (unsigned)char.
Btw, global variables pretty much do count as a mistake, even if it does compile. :)
+ 1
Many thanks. I think I get it. I also found a mistake and my result is now not 5.5.8 but 5.4.8 :)