ערכתי לאחרונה בתאריך 16.11.03 בשעה 16:46 בברכה, דני15
program lala; const n=5; var word:array{1..2} of char; text:array{1..n} of char; i,count:integer; begin count:=0; writeln('Enter the word '); readln(word{1}); readln(word{2}); writeln('Enter the text '); for i:=1 to n do readln(text{i}); for i:=1 to n-1 do if text{i}+text{i+1}=word then count:=count+1; writeln('Number of times '); writeln(count); readln; end.
|
התייחס לסוגריים המסולסלות כסוגריים מרובעות.
|כן|