qfedu-basic-level/day8/d8.cpp

15 lines
298 B
C++
Raw Permalink Normal View History

2023-06-23 17:31:07 +08:00
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int arr[][3] = {1, 2, 3, 4, 5};
// 计算行数
int rows = sizeof(arr) / sizeof(arr[0]);
cout << "行数: " << rows << endl;
cout << "第一行最后一列的值: " << arr[0][2] << endl;
return 0;
}