Answer the question
In order to leave comments, you need to log in
How to get the last line?
I don’t understand how to get the last line in the output example, you need to use this method:
var s:string;a,b,c,d:integer;
begin
readln(s);
b:=length(s);
writeln('d=',b);
writeln('s','[',b,']','=',s[Length(s)]);
d:=b-1;
writeln('d-1','=',d);
writeln('s','[',d,']','=');
end.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question