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

Обсуждение задачи 1226. йынтарбО кодяроп

Help!
Послано Evil Cheater 15 ноя 2002 22:29
  What's wrong with this program? (Any help aprecciated)

Var
   ch: char;
   i,n: integer;
   a: array [1..255] of char;

Begin
      n:= 0;
      Repeat
            read(ch);
            if (ch in ['a'..'z']) or
               (ch in ['A'..'Z']) then begin
                                       Inc(n);
                                       a[n]:= ch;
                                       end
                                  else begin
                                       for n:= n downto 1 do
                                           write(a[n]);
                                       n:= 0;
                                       write(ch);
                                       end;
            until (eof);
End.
Re: Help!
Послано Илья Гофман (Ilya Gofman) 16 ноя 2002 19:49
It's difficult to say. There were some problems about this problem,
because many people solved during the online contest?  and then
recieved an e-mail where i8t was written that it was a mistake, and
it's WA.
Re: Help!
Послано JL Wang 18 ноя 2002 19:13
>   What's wrong with this program? (Any help aprecciated)
>
> Var
>    ch: char;
>    i,n: integer;
>    a: array [1..255] of char;
>
> Begin
>       n:= 0;
>       Repeat
>             read(ch);
>             if (ch in ['a'..'z']) or
>                (ch in ['A'..'Z']) then begin
>                                        Inc(n);
>                                        a[n]:= ch;
>                                        end
>                                   else begin

>                                        for n:= n downto 1 do
>                                            write(a[n]);
>                                        n:= 0;
>                                        write(ch);
>                                        end;
>             until (eof);
> End.
When you press key "Enter" it contains two symbol, but you cna only
read one.
Thanks!, but...
Послано Evil Cheater 20 ноя 2002 07:44
Thanks for the help!

  How can I fix that problem?