C++ 代码
#include <iostream>
#include <cstdio>
using namespace std;
const int N = 1000;
void print1D(int a[],int size);
int i = 1;
int main()
{
int n,size;
int a[N];
cin >> n >> size;
for ( i = 1 ; i<n ;i++) cin >> a[i];
print1D(a,size);
return 0;
}
void print1D(int a[],int size)
{
for(i = 1; i<=size ;i++) cout << a[i] << " ";
}