1.
var s:string; p:integer;
begin
readln(s);
p:=pos('_',s);
delete(s,p,1);
insert(', ',s,p);
writeln(s);
end.
Пример:
program_begin
program, begin
2.
var s:string; l,p:integer;
begin
readln(s);
l:=length(s);
p:=pos(' ',s);
s:=copy(s,p+1,l-p+1)+' '+copy(s,1,p-1)+'?';
writeln(s);
end.
Пример:
program begin
begin program?