问题
单项选择题
以下程序的输出结果是( )。#include<iostream.h>main(){ in(b[3][3]={0,1,2,0,1,2,0,1,2},i,j,t=1; for(i=0,i<3:i++) for(j=i;j<=i;j++) t=t+b[i][b[j][j]]; cout<<t;}
A.3
B.4
C.1
D.9
答案
参考答案:B
以下程序的输出结果是( )。#include<iostream.h>main(){ in(b[3][3]={0,1,2,0,1,2,0,1,2},i,j,t=1; for(i=0,i<3:i++) for(j=i;j<=i;j++) t=t+b[i][b[j][j]]; cout<<t;}
A.3
B.4
C.1
D.9
参考答案:B