Ad
  • Custom User Avatar

    I think so. When I try to perform this operation:
    double numb = Convert.ToDouble("1233.00");
    I get: "System.FormatException: "The input string was not in the correct format.""

  • Custom User Avatar

    I suppose you don't have the correct Culture-Info (Are decimal numbers in your country written with "," ?).

  • Custom User Avatar

    When testing in codewars, I got this result:

    s:
    1000.00!=
    125 Market !=:125.45
    126 Hardware =34.95
    127 Video! 7.45
    128 Book :14.32
    129 Gasoline ::16.10
    ACTUAL:
    Original Balance: 100000.00
    125 Market 12545.00 Balance 87455.00
    126 Hardware 3495.00 Balance 83960.00
    127 Video 745.00 Balance 83215.00
    128 Book 1432.00 Balance 81783.00
    129 Gasoline 1610.00 Balance 80173.00
    Total expense 19827.00
    Average expense 3965.40
    EXPECT:
    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
    False

    when i try in Visual Studio 2019:

    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

    can anyone help?