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

How I must ?
Posted by andgein 16 Feb 2006 20:23
How I must do the <Enter> in my program?
What do you mean by "do the <Enter>"? (-)
Posted by Michael Rybak (accepted@ukr.net) 16 Feb 2006 20:29
-
Re: What do you mean by "do the <Enter>"? (-)
Posted by andgein 16 Feb 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>"? (-)
Posted by Ayhan Aliyev [BOTL] 17 Feb 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>"? (-)
Posted by Igor E. Tuphanov 17 Feb 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 (+)
Posted by Michael Rybak (accepted@ukr.net) 17 Feb 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.