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.
You're right, man. In this kata, instead of learning programming, we learn to pass tests
my result in visual studio
Original Balance: 1000.00
125 Market 125.45 Balance 874.55
126 Hardware 34.95 Balance 839.60
127 Video 7.45 Balance 832.15
128 Book 14.32 Balance 817.83
129 Gasoline 16.10 Balance 801.73
Total expense 198.27
Average expense 39.65
How then to explain the fact that in visual studio I get the necessary output?
And hello, mr.GEniuses who always sure of his code.
Pay attention to the line of the average price. There is a number with a dot.
How can you say that I return int when string is returned?
when compiling in Visual Studio I get the correct answer with 2 decimal places. And here I get the output like this:
Original Balance: 1000.00
125 Market 125.45 Balance 87455
126 Hardware 34.95 Balance 83960
127 Video 7.45 Balance 83215
128 Book 14.32 Balance 81783
129 Gasoline 16.10 Balance 80173
Total expense 19827
Average expense 3965.4
I tried both Math.Round, and String.Format and ToString ("#. ##") nothing works.