A
A
andrey69rus2015-02-18 14:00:30
Delphi
andrey69rus, 2015-02-18 14:00:30

Delphi example solution?

(32/c)+31*b*39
Y = -------------------------------------------------- /b *8
6-a+ln(22+d*31)
had to be solved without brackets
var b,a,d:integer;
Y,YY,YX:real;
Begin
a:=StrToInt(Edit1.Text);
b:=StrToInt(Edit2.Text);
d:=StrToInt(Edit3.Text);
c:=StrToInt(Edit4.Text);
Y:=32/s;
YY:=31∗b∗39;
Y:=Y+YY;
YY:=d∗31;
YY:=log(22+YY);
YX:=6-a;
YY:=YX+YY;
Y:=Y/YY;
Y:=Y/6∗8;
Label1.Caption:=IntToStr(Y);
error Incorrectly defined variables. arithmetic typo
please help me to fix

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vinatorul, 2015-02-18
@andrey69rus

1) Forgot to declare variable c (first line)
2) In the penultimate line, divide by 6, and in the example by b
3) Y is of type Real, and you use IntToStr in the last line

G
globuser, 2015-02-18
@globuzer

oh, good old pascal and delphi....
it's time to switch to python already!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question