填空题
写出下列程序的执行结果是:__________________。#include using namespace std;int f( int [][3], int, int ) ;void main(){ int a[][3] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 } ; cout << f( a, 3, 3 ) << endl ;}int f( int a[][3], int row, int col ){ int i, j, t=1 ; for( i=0; i
|
填空题
写出下列程序的执行结果是:__________________。#include using namespace std;void main(){ int i, count=0, sum=0 ; double average ; int a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } ; for( i=0; i<10; i++ ) { if( a[i] % 2 == 0 ) continue ; sum += a[ i ] ; count ++ ; } average = sum/count ; cout << "count=" << count << "," << "average=" << average << endl ;}
套餐购买该问题答案仅对会员开放,欢迎开通会员 ¥ 19.9
0.64/天
1个月(不限次)
¥ 19.9
1000次
(不限时)
¥ 29.9
0.32/天
3个月(不限次)
¥ 59.9
0.16/天
1年(不限次)
立即支付