#include<iostream>
using namespace std;
int main(){
int score[][60] = {{1,2},{1,4},{3,4},{1,1},{2,4},{2,2},{4,4},{3,2},{2,1},{2,4},{2,4},{3,4},{3,4},{2,1},{2,4},{3,1},{3,3},{2,2}
,{4,3},{2,1},{3,3},{4,4},{3,1},{3,3},{2,4},{4,3},{4,4},{2,2},{3,6},{3,2},{4,4},{4,4},{3,3},{3,3},{3,2},{4,3},{3,4},{2,1},{3,4},{4,4},{4,3},{3,4},{3,3},{3,3},{3,3},{2,2}
,{3,4},{3,1},{4,2}};
cout<<"行数:"<<sizeof(score)/sizeof(score[0])<<endl;
cout<<"列数:"<<sizeof(score[0])/sizeof(score[0][0])<<endl;
return 0;
}
获取二维数组的行列数
最新推荐文章于 2024-02-27 15:39:44 发布