If you have a program Prog that reads from console (and by 'console' here
you mean that it actually reads from the standard input, i.e. you use
System.in in Java or scanf/cin/getline in C++ without explicit redirection
'magic') then you can make it read from a file simply by running it like
that:
$ Prog < task.in
here '$' is just a prompt symbol - you shouldn't type it and '<' means
redirecting the standard input to file 'task.in'.
If you also want to save results to, say, task.out, then run it like:
$ Prog < task.in > task.out

It works in any Linux shell I'm aware of and also in Windows command line
interpreter.




2014-04-09 11:33 GMT+04:00 Moustafa F. Alzantot <[email protected]>:

> what language are you using ?? C++, Java, something else ?
>
>
> On Wed, Apr 9, 2014 at 8:53 AM, charu agarwal <[email protected]> wrote:
>
>> Hi All,
>>
>> Can you please help me on how to use the downloaded .in file as input and
>> produce output file. I can run my code perfectly on giving inputs from
>> console.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Code Jam" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-code/ebf864da-a43f-4f71-ba91-92c232ed94d7%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Regards,
> *Moustafa Farid*
>
> Graduate Student | CSE Department | E-JUST
> Teaching assistant | Faculty of engineering | Tanta University
>
> Mob : +20 (0)111 822 6753
> Personal Page : http://moustafa-z.scienceontheweb.net/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/CAPsp1PqHHC%2B2Zib2wGgOoJ6A3h94SE_7D4n0hhS7%3D0xwnhai2Q%40mail.gmail.com<https://groups.google.com/d/msgid/google-code/CAPsp1PqHHC%2B2Zib2wGgOoJ6A3h94SE_7D4n0hhS7%3D0xwnhai2Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CANBUrM8adxUnD8KbuAUkp%3D20ft4DLK1Fr274sLaR0xV39Jweog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to