Hello, everyone. I'm writing a program which finds all possible side lengths of quadrangle to match specified area.
I've checked the code - everything works, except the part (it's in bold), where the program has to write matching pair of quadrangle side lengths.
var x, y, S, n: real;
WriteLn('Enter quadrangle area:');
WriteLn('Calculating possible lenghts of quadrangle sides...');
While (xy<>S) and (y<=(S/n)) and (x<=S) do begin
If x+n<=S then
** If xy=S then
WriteLn(x:0:2,' ; ', y:0:2);**
WriteLn('Calculation has been finished.');
What's wrong there? Could be a compiler bug or something other?
It looks like you're new here. If you want to get involved, click one of these buttons!