Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Problem is not with printing inputs in C++, but with printing inputs on Codewars. There's no clearly visible console or output area, and users do not know printing is possible. Let's be honest, the test output panel as it looks now does not make the impression that "Aha! I will be able to see my logs there!".
Okay, this could be somewhat language specific because in some frameworks, output can be incomplete while abruptly crashing and needs to be explicitly flushed, but it's not really specific to C++. Additionally, when a crash occurs early in tests, it can result in no logs being printed at all, additionally enforcing the impression that printing does not work. But other languages/test frameworks suffer from this problem too.
There should be no floating point repesentation issues. Order of evaluation is defined, so there should be no ambiguity.
It is quite possible that expected values or reference implementations use wrong orders internally, but this problem should be solved correctly. Using fixed point libraries is not the correct solution.
Closing.
Isn't it possible to print inputs in C++?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution