package jinjieshilie; import java.io.*; import java.util.Scanner; public class print3 { public static void main(String[] args) { try{ PrintStream plzq=new PrintStream("e:/aaa.txt"); PrintStream plcw=new PrintStream("e:/bbb.txt"); Scanner ss=new Scanner(System.in); System.setOut(plzq); System.setErr(plcw); while(true){ int shuzi=ss.nextInt(); System.out.println(shuzi); } } catch(Exception e){ System.err.println("输入有误"); } } }
时间: 2024-10-06 10:57:14