
20.02.2009, 23:43
|
|
Banned
Регистрация: 06.01.2008
Сообщений: 904
С нами:
9655526
Репутация:
1821
|
|
Сообщение от slesh
тогда идем так:
Код:
var
c,last_c:char;
cnt:integer;
f:text;
begin
cnt:=0;
last_c:=' ';
assign(f,'input.txt');
reset(f);
while not eof(f) do
begin
read(f,c);
if (c in ['!','?','.']) and (last_c in ['!','?','.']=false) then inc(cnt);
last_c:=c;
end;
close(f);
вывод cnt
Slesh Есть недочеты в коде:
Вот пофикси.
Код:
assignfile(f,'input.txt');
|
|
|