我需要在数组中显示偶数(在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