【单选题】下面的程序输出100-300之间的素数,阅读程序并填空。 Function sushu(Byval x As Integer) As Boolean Dim i As Integer sushu = False For i = 2 To sqr(x) If x Mod i = 0 Then exit for Next i If i >= sqr(x) Th...
【简答题】以下程序的功能是利用堆进行排序。请在空白处填上适当语句,使程序完整。 PROCEDURE sift(VAR r:arr;k,m:integer); VAR i,j,x:integer; t:rec; finished:boolean; BEGIN i:=k; (1) ___; x:=r[i].key; (2) ___; t:=r[k]; WHILE (j<=m) AND NOT finished ...