ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1038. Проверка орфографии

The problem is generally very simple but in pascal(i don't know if in C also) the problem is to read input corectly can anyone help me please ?
Послано Mateusz Linda 9 сен 2002 00:57
The problem is  generally very simple but in pascal(i don't know if
in C also) the problem is to read input corectly :(((( I 've tried
methods with eof and eoln but theyb seem to don't work can anyone
tell me how can i read inpuit in my program (below) please ....
(bledy=mistakes, zdanienowe= new sentence, nowywyraz= new word)
var
m:string[200];
d,i,c,z:byte;
bledy:longint;
zdanienowe,nowywyraz:byte;
procedure sprawdz;

begin
d:=length(m);
i:=0;
                while i<d do
                begin
                inc(i);
                if (ord(m[i])=46)or(ord(m[i])=33)or(ord(m[i])=63)
then zdanienowe:=1
                else  if (ord(m[i])=0)or(ord(m[i])=32) then
                         begin
                         nowywyraz:=1;
                         c:=1
                      end
                else if (ord(m[i])>63)and(ord(m[i])<91)or(ord(m[i])
<123)and(ord(m[i])>96)then

                begin

                  if (zdanienowe=1) then
                  begin
                  if (ord(m[i])<123)and(ord(m[i])>96) then inc(bledy);
                  zdanienowe:=0;
                  end
                  else if nowywyraz=1 then
                  begin
                  nowywyraz:=0;
                  c:=0
                  end
                  else if (ord(m[i])>63)and(ord(m[i])<91) then inc
(bledy);
                  end;
               if c=0 then nowywyraz:=0;
               end;
end;
begin
zdanienowe:=1;
readln(m);

while m<>''do
begin
nowywyraz:=1;
if m<>'' then sprawdz;
readln(m);
end;
writeln(bledy);
end.
Re: The problem is generally very simple but in pascal(i don't know if in C also) the problem is to read input corectly can anyone help me please ?
Послано Locomotive 19 дек 2002 14:59
Are you have still Problem?