由买买提看人间百态

topics

全部话题 - 话题: roomnum
(共0页)
b******g
发帖数: 669
1
来自主题: Software版 - 一个java的小问题
PrintStream diskWriter = new PrintStream("H");
diskWriter.print("1 12 1 3 11 4 32 23");
Scanner diskScanner = new Scanner( new File("H"));
int floor, roomNum;
for(floor=1;floor<=2;floor++){
out.print("Floor ");
out.print(floor);
out.print(": ");
for(roomNum=1;roomNum<=2;roomNum++){

out.print(diskScanner.nextInt() +' ');
}
out.println();
}
... 阅读全帖
(共0页)