case 1:i1++;break; case 2:2++; } cout<<i0<<’’<<il<<’’<<i2<<endl; } 运行结果: 24.#include<iostream.h> void main(){ inta[3][4]={{1,2,7,8},{5,6,11,15},{9,20,3,4}); intm=a[0][0]; for(int i=0;i<3;i++) for(int j=0;j<4;j++) if(aCi]j]>m)m=aCi]]; cout<<m<<endl; } 运行结果: 25.include<iostream.h #include<string.h> void main(){ char af5]={"student","worker","cadre","soldier","apen"); unsigned int n=strlen(a[O]); for(int i=1;i<5;i++) if(strlen(a[i])>n)n=strlen(afi]); } cout<<n<<endl; } 运行结果: 26.#include<iostream.h 327case 1: il + + ; break; case 2: i2 + + ; cout<<iO<<' '<<il<<' '<<i2<<endl; 运行结果 24. # include<iostrearn. h> void rnainO { int a[3][4]={{1.2.7. 剖, {5.6.11.1 .{9.20.3. 的}; int rn=a[O][O]; for(int i=O ;i<3;i++) for Cint j=O;j<4;j++) if( a[i][j]>rn) rn=a[i][j]; cout<<rn<<endl; 运行结果 25. include<iostrearn. h> # include<string. h> void rnainO { char a[5] = {" student" • "worker" • "cadre" • "soldier" .飞pen"}; unsigned int n=strlen(a[O]); for(int i=1 ;i<5;i++){ if(strlen(a[i])>n) n=strlen(a[i]); cout< <n< <endl; 运行结果 26. # include<iostrearn. h> 327