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

Discussion of Problem 1001. Reverse Root

how will we our program (code) know " this is an end of input "?
Posted by Ajeet Shah 19 Oct 2011 02:44
Hello!

How do we know how many integers will be they entering as input? Because generally hitting "ENTER" indicates "end of input" but here any number of "Enter (New Line)" can be used between two Inputs.

They can input anything like this:
---------------------------------------
   144 625     25        81

100

           10000 3877935
---------------------------------------
how will we our program (code) know " this is an end of input "?
I mean till when should we use "scanf" in program?

thanks

Edited by author 19.10.2011 02:45
Re: how will we our program (code) know " this is an end of input "?
Posted by Sandro (USU) 19 Oct 2011 13:25
Re: how will we our program (code) know " this is an end of input "?
Posted by Ajeet Shah 20 Oct 2011 15:27
It helped. Thanks!
Re: how will we our program (code) know " this is an end of input "?
Posted by Ajeet Shah 20 Oct 2011 15:27


Edited by author 20.10.2011 15:29