問題詳情

三、請問執行下列 JAVA 程式碼後的結果為何?請繪製此程式的流程圖。(20 分)
01. public class ShowClass {
02. public static void main( String[] args )
03. {
04. int row = 4;
05. int column;
06.
07. while ( row >= 1 )
08. {
09. column = 1;
10.
11. while ( column <= 5 )
12. {
13. System.out.print( row % 2 = = 1 ? "<-" : "->" );
14. ++column;
15. } // end while
16.
17. --row;
18. System.out.println();
19. } // end while
20. } // end main

參考答案

答案:A
難度:簡單0.762832
統計:A(431),B(41),C(9),D(31),E(0)

內容推薦

內容推薦