Subj : Trying
To : Sean Dennis
From : Roelof Beverdam
Date : Sun Jun 05 2005 09:50 am
Hello Sean,
> Temp := Sin(2*(Work/23)*Pi)*100;
> dWriteLn('Your physical percentage is '+Temp+'%.');
[cut]
> Unfortunately, math is not my strong spot and I know that there's a simple
> solution to this somewhere. Can anyone help?
What exactly is your problem? And what compiler + version are you using? And
where exactly does the compiler complain with which error code?
You did realize you should use a ftos(..) in the dWriteLn argument, did you? Or
itos(..) after conversion to integer - like you did in previous lines.
And as for Turbo Pascal: you should use the correct floating point format (real
versus double) and enable it with the $N directive. And if you are not
emulating floating point operations, be assured to run on 80386 or better - or
the systems to have a math coprocessor.
Cheers,
Roelof Beverdam
--- Dutchie V3.10.11
* Origin: The Beaver's Nest (2:280/5218)