discount_percent is defined as an int. You try to assign values that are floating point values that are less than 1. 0.10 and 0.18 are integer truncated to 0.
If you declared discount_percent as either a float or double then the assigned values would work.
Number of units purchased is: 50
Number of units purchased is: 50
Discount applied is: 18.00%
Total savings due to discount is: 891.00
Total cost of the purchase is: 4059.00