1 / 4
Jan 2005

Can somebody tell me how to read input data and write results to output?

  • created

    Jan '05
  • last reply

    Mar '07
  • 3

    replies

  • 1.6k

    views

  • 4

    users

  • 1

    link

Use standard input and standard output. These file streams can be accessed as the "default" for reading and writing in many languages. So, you can use e.g. scanf/printf in C, read/write without a filename in pascal, etc. See the Languages section of the forum for examples of how to solve problem TEST in different programming languages.

2 years later

OK, but I am new to these online judges e.g the TEST program .... if the Input example is:
1
2
88
42
99

and output:
1
2
88
42

Does that mean the user enters all the Inputs and THEN the output is processed or can it be taken that user enters '1', '1' is output; users enters '2', '2' is output ... etc..?