正在加载图片...
得分 评卷人 三、写出下列每个程序的运行结果(每小题6分,共36分) 21..#include<iostream.h> int WF(int x,int y){ x=x+y; y=x十y: return x+y;) void main(){ cout<<WF(8,5)<<endl; 运行结果: 22.#include<iostream.h void main(){ inta[6]={36,25,48,14,55,40}, int b1=a[0]; for(int i=1;i<6;++) if(a[i]>b1)b1=a[i]; cout<<“bl=”<<bl<<endl; } 运行结果: 23.include<iostream.h void main(){ inta[10]={12,39,26,41,55,63,72,40,83,95}; inti0=0,il=0,i2=0; for(int i=0;i<10;i++) switch(ai]3){ case 0:i0++;break; 326|得分|评卷人| | 三、写出下列每个程序的运行结果{每小题 分,共 36 分} 21. . # include<iostream. h> int WF(int x ,int y) { x=x y; y=x+y; return x+ y; } void mainO{ cout< <WF( 8 ,5) < <endl; 运行结果= 22. # include<iostream. h> void main () { int a[6]= {36 ,25 ,48 ,14 ,55 ,40}; int b1=a[0]; for(int i=1;i<6;i++) if(a[i]>bl) b1 =a[i]; cout<<"b1="<<b1<<endl; 运行结果 23. # include<iostream. h> void mainO { 326 int a[10]= {12 ,39 ,26 ,41 ,55 , 63 ,72 ,40 ,83 ,95}; int iO=0 ,i1=0 ,i2=0; for(int i=0 ;i<10;i++) switch(a[i] %3) { case 0: iO + + ; break;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有