You are viewing a single comment's thread. Return to all comments →
This challenge is well resentative of why I usually dislike website claiming to teach you C++.
It encourage using C. I love C, but C != C++, don't say it's C++ if you ask to use C. Some guys told me it's because it easier to teach that way because you don't have to talk about the C++ syntax too fast. So you have to teach C syntax instead and then you have to forget what you learn and learn another syntax instead. Yeah, easier for sure... Want to learn C ? Go learn it. Want to learn C++ ? Go learn it too, directly, you don't need to learn C first !
It show false arbitrary statement like "cout is slower". It may be, but it's not true every time, cout is subjet to a lot of improvement when you know it and use it the way it should be.
It teach bad pratices: you should not include header you don't need. And you don't need to use printf/scanf, so you don't need cstdio. Neither you need other headers like math or whatever I saw in other challenges. And you SHOULD NOT make a global "using namespace std;". It's a really bad practice, you should do that in scope only. Even better : don't do using namespace at all. It's only few letters, it's not like if the namespace was "system::standard::iostream::console" or something.
Challenge requirements are not all specified : it require some specific precision on float and double but nothing is told about it. Nothing is told about what to do if the user input is not what you were waiting, etc... leading to learning bad pratice again.
So please modify the callenge to correct thoses point, lot of people are complaining about it. Please remember that people are supposed to learn from theses samples. Don't let them learning bad practices.