Ad
  • Default User Avatar

    You're right, man. In this kata, instead of learning programming, we learn to pass tests

  • Default User Avatar

    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

  • Default User Avatar

    How then to explain the fact that in visual studio I get the necessary output?

  • Default User Avatar

    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.

  • Default User Avatar

    How can you say that I return int when string is returned?

  • Default User Avatar

    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.