TherosEquipment
asked on
Multiply an Integer by a Percentage (arg!)
Hello,
I know this should be simple, but it's kicking my butt!
Here is what I got...
editbox1 contains a string representing a dollar amount
example = [58]
editbox6 contains a value representing a discount off of the price in editbox1
example = Discount [20] %
How do I calculate this and represent it in another string?
listview1.subitems[1].add( IntToStr(S trToInt(ed itbox1.tex t) * percentage));
Thanks!
I know this should be simple, but it's kicking my butt!
Here is what I got...
editbox1 contains a string representing a dollar amount
example = [58]
editbox6 contains a value representing a discount off of the price in editbox1
example = Discount [20] %
How do I calculate this and represent it in another string?
listview1.subitems[1].add(
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had to modify what you did, but you pointed me in the right direction...
listitem.subitems.Add(Floa tToStr(Str ToFloat(fl atedit4.te xt) * (1 - (StrToFloat(flatedit6.text ) / 100))));
listitem.subitems.Add(Floa
percentage:real;
begin
percentage:=StrToFloat(edi
listview1.subitems[1].add(