我需要在數組中顯示偶數(在Psuedocode中),我完全失去了如何做到這一點。在數組中顯示偶數
這是據我已經得到了:
Begin write_evens(in numbers As Array of Integers, in array_size As Integer)
Declare count As Integer
Set count ← 0
While count < size
*******I'm stuck on what to do in the loop*****
Set count ← count + 1
{編輯}
這裏是我所在的地方:
Begin write_evens(in numbers As Array of Integers, in array_size As Integer)
Declare count As Integer
Set count ← 0
While count < size
If array_size % 2 == 0
Write array_Size
End if
Set count ← count + 1
End
您應該在循環內寫入的僞代碼是'if is_even(count)then print(count)'。 – 2014-10-17 16:34:35