#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int list1[10]={1,2,3,4,5,6,7,8,9,10};
int list2[10]={11,22,33};
int index;
cout << "number 0 : " << list1[0] << endl;
cout << "number 1 : " << list1[1] << endl;
list2[3]=list2[0]+list2[1]+list2[2];
cout << "list2 number 3 :" << list2[3] << endl;
cout << "choose a number of list1 :" << endl;
cin >> index ;
cout << "the number is " << list1[index] << endl;
return 0;
}
C++ 数组
最新推荐文章于 2024-06-29 22:05:14 发布