【简答题】下面程序的运行结果是( )。 #include int main() { int i=3,j=1,k=2; if(i>k) { if(j>k) printf("i and j are greater than k."); } else printf("i is less than or equal to k."); printf("end."); return 0; }
【简答题】以下程序执行后输出结果是 ________________ Private Sub Command1_Click() For i = 1 To 20 Step 2 If i Mod 3 = 0 Or i Mod 5 = 0 Then k = k +i Next i Print "k="; k End Sub
【简答题】阅读下列程序,写出程序运行结果。 Option Base 1 Private Sub Command1_Click() Dim A(3, 3) As Integer, I As Integer, J As Integer, K As Integer I = 3: J = 1 A(I, J) = 1 For K = 2 To 9 If I + 1 > 3 Or J + 1 > 3 Then If J...
【简答题】指出下列算法中错误、低效之处,并将其改成一个正确且高效的算法。 PROCEDURE delk(A, m , last,i, k) ; {从数组 A[1..last]中删除第i个元素起的 k个元素,m为A上限} BEGIN IF(ilast) OR(km) THEN write ('error') ELSE FOR count: = 1 TO k TO [FOR j:=last ...