ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

Vladimir Milenov Vasilev HELP ME,PLS...1102 [3] 28 Jul 2002 17:59
Hi!
When reading string from the standart input character by character,
how can I stop reading it and go to the next line of the input..
I mean, when I understand the answer is "NO", I don't need to read
the whole string, as the answer will be the same, I just want to go
to the next line and proceed with the next string.
How to do This?
Thanks in advice :)
Andrey Popyk (popyk@ukr.net) Re: HELP ME,PLS...1102 [2] 29 Jul 2002 16:48
while not eoln(INPUT) do
begin
  ...
  ...
  if NO then break;
  ...
end;

if not eoln(INPUT) then readln;

Vladimir Milenov Vasilev Re: HELP ME,PLS...1102 [1] 29 Jul 2002 22:21
Thank you verry much, but I am using C++...
Do you know how it will be there?
Andrey Popyk (popyk@ukr.net) cin.ignore(10000,'\n') 31 Jul 2002 14:56