Somando campos com porcentagem

Delphi

05/12/2003

QUERO MOSTRAR NUM EDIT3 A SOMA DE UM VALOR NO EDIT1 E NO EDIT2

EX:

EDIT1 = 250
EDIT2 = 80 (EM ¬)

EDIT 3 = A SOMA DOS VALORES


Njunior

Njunior

Curtidas 0

Respostas

Wallacest

Wallacest

05/12/2003

VAR A, B,C : Integer;
begin
A := StrToInt (Edit1.text)
B := (StrToInt (Edit2.text)) * (A/100)
C:= (A+ B)

Edit3.text := IntToStr (C)


GOSTEI 0
Yankleber

Yankleber

05/12/2003

Você não pode somar um valor absoluto com uma porcentagem.
Isso é conceitualmente incorreto...


GOSTEI 0
POSTAR