Write in Pascal a program for cyclic exchange of values of three variables a, b, c.

Write in Pascal a program for cyclic exchange of values of three variables a, b, c. For example, if before the exchange it was: a = 1, b = 2, c = 3, then after the exchange it should become: a = 2, b = 3, c = 1.

program cycle;

var a, b, c, tmp: integer;

begin
writeln (‘Enter three numbers separated by a space’);
readln (a, b, c);
writeln (‘Values of variables before exchange’);
writeln (‘a =’, a, ‘; b =’, b, ‘; c =’, c, ‘.’);
writeln (‘Values of variables after exchange’);
tmp: = a; a: = b; b: = c; c: = tmp;
writeln (‘a =’, a, ‘; b =’, b, ‘; c =’, c, ‘.’);
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.