var inputString, outputString: string; i: integer;
begin writeln('Enter a string: '); readln(inputString);
outputString := inputString;
for i := 1 to length(inputString) do begin if (inputString[i] >= 'a') and (inputString[i] <= 'z') then outputString[i] := chr(ord(inputString[i]) - 32); end;
writeln('String with lowercase letters replaced by uppercase letters: '); writeln(outputString); end.
program ReplaceLowercaseToUppercase;
var
inputString, outputString: string;
i: integer;
begin
writeln('Enter a string: ');
readln(inputString);
outputString := inputString;
for i := 1 to length(inputString) do
begin
if (inputString[i] >= 'a') and (inputString[i] <= 'z') then
outputString[i] := chr(ord(inputString[i]) - 32);
end;
writeln('String with lowercase letters replaced by uppercase letters: ');
writeln(outputString);
end.