I'm calculating product prices after discounts. An example would be product A would be 100 dollars with a 11.5% discount. When I store the 11.5% discount in a decimal as something like
myDecimal = 0.885M
the variable gets rounded to 2 places to become 0.89. Am I using the wrong datatype? I'm not sure what else to use because I was taught not to use floating point values because of the math errors.
What would be a solution?