一、在不改變最後輸出(print)的狀況下,請使用指令 While 取代指令 Repeat,重新書
寫下列片段的虛擬碼(pseudocode),其中粗體字為指令之關鍵字。(15 分)
Assign Sum the value 1;
Repeat (Print the value assigned to Sum;
Assign Sum the value Sum+1)
until (Sum = 5)
詳解 (共 1 筆)
詳解提供者:劉志宏
assign sum the 1;
while (sum<=5){
print the value assiggned to Sum;
assign Sum the value Sum+1;
}