【正确答案】正确答案:【操作步骤】 步骤1:打开考生文件夹下的工程文件sjt5.vbp,在代码编辑窗口的指定位置编写以下代码。参考代码: For k=1 To N Sum=Sum+a(k,k) If a(k,k)/3=Int(a(k,k)/3)Then Counter=Counter+1 End If If k<>N-k+1 Then If a(k,N-k+1)/3=Int(a(k,N- k+1)/3)Then Counter=Counter+1 End If End If Next iblSecond.Caption=Sum lblFirst.Caption=Counter 步骤2:按<F5>键运行程序,然后单击“计算”按钮。 步骤3:按要求将文件保存至考生文件夹中。
【答案解析】