#pragma section-numbers off

標準入力、標準出力ならばcatの実装となる。ファイルへの出力をするならばcpの実装と見る事も可能。

とりあえずcatとして実装

= Java =
{{{
import java.io.*;

public class Sft1_1 {

    public static void main(String args[]) {
        try {
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            String str;
            while ((str = in.readLine()) != null) {
                System.out.println(str);
            }
            in.close();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }

}
}}}


= Python =
{{{
import sys
print sys.stdin.read(),
}}}



----
SoftwareTools
CategoryPrograming