Write a program that replaces all uppercase letters with lowercase letters and lowercase

Write a program that replaces all uppercase letters with lowercase letters and lowercase letters with uppercase letters in a given character string. (Pascal)

If the program will not work with Cyrillic characters, then you should delete lines with four-digit values for selection in case and work only with Latin ones.

program Up_Low;
var s: string;
c: integer;
begin
writeln (‘Enter a string of uppercase and lowercase letters’);
readln (s);
for i: integer: = 1 to length (s) do
begin
c: = ord (s [i]);
case c of
97..122: write (chr (Ord (c) -32));
65..90: write (chr (Ord (c) +32));
1025: write (chr (Ord (c) +80));
1105: write (chr (Ord (c) -80));
1040..1071: write (chr (Ord (c) +32));
1072..1103: write (chr (Ord (c) -32));
else write (s [i])
end
end
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.