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.
This comment is hidden because it contains spoiler information about the solution
thx ;)
Why do you want to put a colon there? We need to separate two arguments (r and s) that are passed to the function.
XD
xD
Nice idea I very like it.
That could works if a, b, c will be random in the real life we could check what what grade is most common.
But for the sake of readability, I would prefer either ascending or descending order.
how to create that code?
I have heard opinions that it is best to stick to the standard of the project you work in, so that the new code is written in a similar style, then the code is easier to read. Unfortunately most C/C++ projects are very old, so they are written in different styles, then refactoring the file you are changing looks like a good approach.
I cannot agree with that for the above case.
Since we have a return in each if, the program will not check the next conditions. So using an else if here will have the same effect and it only increases the length of the code and may only be puzzling for the reader of the code why some put else keyword.