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
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
In docs: https://en.cppreference.com/w/cpp/algorithm/transform
thank you haha, I could of done better though my code does more things than it needs to where that I didn't realize until I saw others solutions
https://isocpp.org/wiki/faq/coding-standards#using-namespace-std
Yes, && is a logical And. It will return True if both conditions are True, and False otherwise.
It also resolves from left to right, and exits immidiately if it encounters a False. So if a or b are 0, it will exit on (a != 0) or (b != 0) before it attempts to % by a and b (which would otherwise throw a divide by 0 error in these cases).