728x90

1) 코드

import java.io.*;
import java.util.Stack;

public class Main {
    static Stack<String> stack = new Stack<>();
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String str;
        while( (str = br.readLine()) != null) {
            bw.write(str);
            bw.flush();
        }
        bw.close();
    }
}

2) 출력결과

 - 초록색이 input이고, 흰색글자가 output 이다.

728x90
TOP