Let me start by saying: "ARRRRRRRRRRGGHHHHHHH"
I cannot for the life of me figure out how to use decimals in RL.
For example:
I am writing the code to simulate a Coke machine.
The number of coins and or dollar bills routines are ok.
The problem I have is determining the total amount of money inserted.
For example: I have inserted 5 dimes. (ACC=5) I then need to convert to 50 (.50) cents.
After all coins, quarters, nickles or dollar bills have been inserted, I need these converted numbers to be totaled and compared to the product price for dispensing.
I'm STUCK!
Short version: How can I get a decimal result.
I have searched hi and low - low and high, and googled it to death.
Any help or answers or pointers will be appreciated.
TIA
Malt aka LWCiak
I cannot for the life of me figure out how to use decimals in RL.
For example:
I am writing the code to simulate a Coke machine.
The number of coins and or dollar bills routines are ok.
The problem I have is determining the total amount of money inserted.
For example: I have inserted 5 dimes. (ACC=5) I then need to convert to 50 (.50) cents.
After all coins, quarters, nickles or dollar bills have been inserted, I need these converted numbers to be totaled and compared to the product price for dispensing.
I'm STUCK!
Short version: How can I get a decimal result.
I have searched hi and low - low and high, and googled it to death.
Any help or answers or pointers will be appreciated.
TIA
Malt aka LWCiak