Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- Explanation: Returns the opposite number of e. -999.9 to 999.9 OR 999.9 to -999.9 (- <=> +)
- [==============================================================================}
- function OppositeE(e: Extended): Extended;
- begin
- Result := (e * -1);
- end;
- var
- x: Extended;
- begin
- ClearDebug;
- x := (10.123 + Random(100));
- WriteLn(OppositeE(x));
- x := (x - (200.99 + Random(1000)));
- WriteLn(OppositeE(x));
- end.
Advertisement
Add Comment
Please, Sign In to add comment