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.
Good to know! Super useful for very small values of p0 and or very large values of p. It really helps to be familiar with compound interest/annuities, otherwise it's really easy to get lost working out the logic.
The percent inputs are not in decimal form. Dividing percent by 100 gives you the correct number to work with.
As for why it's 1+percent, it may help to think in terms of money.
The "2 percent" you are referring to was just an example. In the actual exercise, the percent value is variable.
Not sure if something updated but it appears System.out.print now works to some extent. The only condition is that your code compiles perfectly. Once that's satisfied, you should be able to print to console messages in your solution. You can also modify the example test cases to print out each case.
This comment is hidden because it contains spoiler information about the solution
In your code, you are always returning the same answer no matter what n is. The design here is to allow any number, n, to be used and spit out in reverse.