var vstup: string; pod: string; q, posun: integer; begin readln( vstup ); readln( pod ); posun := 0; q := pos( pod, vstup ); while q<>0 do begin writeln( q+posun ); vstup := copy( vstup, q+1, 255 ); posun := posun + q; q := pos( pod, vstup ); end; end. var f: text; c: char; i: integer; slovo: string; begin assign( f, '181022.PAS' ); reset( f ); while not eof(f) do begin read( f, c ); if ((c>='a') and (c<='z')) or ((c>='A') and (c<='Z')) then slovo := slovo + c else begin if length( slovo ) >=5 then begin write( slovo ); readln end; slovo := '' end end end. var g: text; i: integer; begin assign( g, 'vystup.txt' ); rewrite( g ); for i:=1 to 1000 do writeln( g, i ); close( g ); write( '---KONEC---' ) end. var f: text; c: char; s: string; begin assign( f, '181022.PAS' ); reset( f ); while not eof( f ) do begin { read( f, c ); write( c ); } readln( f, s ); write( s ); readln end; close( f ) end. var s: string; c: char; i: integer; begin s := 'abcdefghij'; s := copy( s, 5, 2 ); s := ''; i := 0; while not eof do begin read( c ); {----- spatne: ----- i := i+1; s[ i ] := c -----------------------------} {-------- dobre: -----------} s := s + c end; writeln( 's = "',s,'".' ) end. array[ char ] of char const MAX = 60000; var MuzeTohleCisloJesteBytPrvocislo: array[2..MAX] of boolean; i,j: word; begin for i:=2 to MAX do MuzeTohleCisloJesteBytPrvocislo[ i ] := TRUE; for i:=2 to MAX do if MuzeTohleCisloJesteBytPrvocislo[ i ] then begin write( i,' ' ); for j:= 2 to MAX div i do MuzeTohleCisloJesteBytPrvocislo[ j*i ] := FALSE end end. var A: array[char] of char; c: char; begin for c := #0 to #255 do A[ c ] := c; A[ 'i' ] := 'y'; A[ 'y' ] := 'i'; A[ 'a' ] := 'e'; A[ 'e' ] := 'a'; A[ 'p' ] := 'b'; while not eof do begin read( c ); write( A[ c ] ) end end. var A: array[ char ] of integer; c: char; begin for c:=#0 to #255 do A[ c ] := 0; while not eof do begin read( c ); A[ c ] := A[ c ] + 1 end; for c := #0 to #255 do if A[ c ] > 0 then writeln( 'Znak: ',c,' pocet: ', A[ c ] ) end. var c: char; A: array[1..1000] of char; pocet, i: integer; begin pocet := 0; while not eoln do begin read( c ); pocet := pocet+1; A[ pocet ] := c end; for i := pocet downto 1 do write( A[i] ); writeln end. var i,j: integer; begin for i:=1 to (i+1) do begin for j := 1 to 8 do write( i*j:4 ); writeln end end. var i: integer; begin for i := 1 to 10 do begin if i=2 then continue; writeln( i ); if i=3 then break end end. var i: integer; c: char; begin for c:='a' to 'z' do writeln( 'Znak ',c,' ma kod ', ord(c) ); for i:=1 to 10 do write( i:4 ) end. type rocnik = 1..10; {$R-} var R: rocnik; begin R := 1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; R := R+1; end. var b: boolean; begin b := FALSE; b := succ( b ); b := succ( b ) end.