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

Общий форум

How I must ?
Послано andgein 16 фев 2006 20:23
How I must do the <Enter> in my program?
What do you mean by "do the <Enter>"? (-)
Послано Michael Rybak (accepted@ukr.net) 16 фев 2006 20:29
-
Re: What do you mean by "do the <Enter>"? (-)
Послано andgein 16 фев 2006 20:33
Wnen I have got a new string(at time of input) my program think that it is the end of input and begin to work!
Re: What do you mean by "do the <Enter>"? (-)
Послано Ayhan Aliyev [BOTL] 17 фев 2006 00:19
Yes your program thinks it is ed of input and begins to work, but still what do You mean with <Enter>?
Please explain it clearly.
Re: What do you mean by "do the <Enter>"? (-)
Послано Igor E. Tuphanov 17 фев 2006 10:27
About your <Enter> - if you talk about console, this sounds buggy. How do you read data?
Always test your program, reading files. Just comment it, when submit.
I think I know what you mean (+)
Послано Michael Rybak (accepted@ukr.net) 17 фев 2006 12:58
Probably you want to read the input and to understand that a line of input finished, right?

Here's a pascal program to sum up numbers till end of line:

var sum, v: longint;
begin
  sum := 0;
  while not SeekEoln do begin
    read(v);
    sum := sum + v;
  end;
  writeln(sum);
end.

P.S. As for C++, guys, please give an example with cin.