On 7/8/06, Mohammad Moghimi <[EMAIL PROTECTED]> wrote:
this code fragment may solve your problem:---------------------------------------------int x;while (cin >> x) {// do something with x}---------------------------------------------
On 7/8/06, Munish Goyal < [EMAIL PROTECTED]> wrote:u get the input from STDIN and u end taking input when u read an EOF.
ofcourse the input will come thru a file to ur program but ur program need not know abt the file.
to ur prog. the input will be from stdin .
so just keep reading till EOF.
On 7/7/06, Arun <[EMAIL PROTECTED]> wrote:i know this isnt a good place to ask this. but i have seen ppl discussing questions on mipt. anyway my basic qn is
consider this very simple problem.
http://acm.mipt.ru/judge/problems.pl?problem=001&CGISESSID=43c5f86726f4af1d4e688a981c65620c
i dont know where to get the input from. it says "List of integers ends with EOF". does it read from a file.(if so wat is the filename ? passed as arg?) .. if reading from STDIN, reading character by character (and then concat to form int)seems ugly and how do u input EOF?.
--Munish Goyal
Denali Software Inc.
Bangalore
919342539813
, 133470973390.236450, 270};
int main(){m[2]--?m[0]*=4,m[1]*=5,main():printf(m);}
Don't attach in Microsoft (.DOC, .PPT) format
http://www.gnu.org/philosophy/no-word-attachments.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---
