Working With Floats and Integers

前端 未结 7 739
旧时难觅i
旧时难觅i 2020-12-21 08:40

I\'ve created an ATM like program which holds the money in a person\'s account. When the person takes out a withdrawal, it subtracts the withdrawal from the account along wi

7条回答
  •  礼貌的吻别
    2020-12-21 09:26

    Make your life a little easier, and rather than thinking of your "ints" as dollars, think of them as "cents" then you won't need floating point numbers.

提交回复
热议问题