Can somebody tell me how to read input data and write results to output?
created
last reply
- 3
replies
- 1.6k
views
- 4
users
- 1
link
Can somebody tell me how to read input data and write results to output?
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.
Whichever one is easier (though the latter is usually preferred).
Check the TEST solutions in each of the programming fora (like https://www.spoj.pl/forum/viewtopic.php?t=49339 for example) for some ideas on the input/output methods in each language.