Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Swapper;
- procedure Swap(var X, Y: real);
- begin
- X = X + Y;
- Y = X - Y;
- X = X - Y;
- end;
- var
- A, B, C, D: real;
- begin
- WriteLn('Введите четыре вещественных переменных');
- ReadLn(A, B, C, D);
- Swap(A, B);
- Swap(C, D);
- Swap(B, C);
- WriteLn('Результат: A=', A, ' B=', B, ' C=', C, ' D=', D);
- end.
Advertisement
Add Comment
Please, Sign In to add comment