执行下列程序的输出结果为( )。[程序] #include using namespace std; int main(void) {int i=0,j=1,k=1;switch(i){case 1: if(j!=0) k+=1;else k+=2;break;case 2: k+=3; break;default: k+=4;}cout<
查看答案
执行下列程序的输出结果为( )。[程序] #include using namespace std; int main(void) {int a=1,b=0;for(; a<10; a++){if(a%3==0) continue;b++;if(b%5==0) break;}cout<
A. 32
B. 35
C. 75
D. 106
下列程序的功能是求出所有3位整数中各位数字之和等于5的整数。请完善程序。[程序] #include using namespace std; int main(void) {int n,a,b,c;for(n=100; ___(1)___;n++){a=n%10;b=___(2)___;c=n/100;if(a+b+c___(3)___5)cout<
下列程序求百钱百鸡问题:已知公鸡每只5元,母鸡每只3元,小鸡每3只1元,100元钱买100只鸡,问公鸡、母鸡和小鸡各买多少只?请完善程序。[程序]#includeusing namespace std;int main(void){int cock,hen,chicken;for(cock=1;cock<=20;cock++)for(hen=1;hen<=33;hen++){chicken=___(1)___;if((cock*5+hen*3+___(2)___==100)___(3)___(hicken%3==0))cout<
下列程序求从键盘输入的3个数中的最小数,请完善程序。[程序]#include<___(1)___>using namespace std;int main(){int a,b,c,n;cout<<"Enter 3 numbers...";cin>>a>>b>>c;____(2)____=a