percent = 5; (int)
price = 10000; (int)
float: truePercent = percent/100.0; - this makes me %.2f = 0.05 - this what i need.
Now i need to do this: (price*truePercent)+price | example: (10000*0.05)+10000 = 10500
How to do this the best way with floatround and get this as integer? Its annoying me..
price = 10000; (int)
float: truePercent = percent/100.0; - this makes me %.2f = 0.05 - this what i need.
Now i need to do this: (price*truePercent)+price | example: (10000*0.05)+10000 = 10500
How to do this the best way with floatround and get this as integer? Its annoying me..