$30#25#20#15#10#5#0#-5# //2 //3 //4 //5 //6 ここまでは設定 InputStream fileStream = new FileInputStream("data.txt"); System.setIn(fileStream); Scanner sc = new Scanner(System.in); //1.for文で、 30#25#20#15#10#5#0#-5# と表示