The read (s2) procedure is not executed.

Code

var s1, s2: string; h1, m1: integer; begin read(s1); h1 := Strtoint(s1[1:3]); m1 := StrtoInt(s1[4:6]); read(s2); write(h1, m1); end. 

It works like this

 12:25 (спросил s1) 1225 

And so it is necessary

 12:25 (спрашивает s2) 1225 
  • ReadLn(s1); ... ReadLn(s2); - Igor
  • Thanks, earned - Qwinty

1 answer 1

Read the line:

 ReadLn(s1); ... ReadLn(s2);