#include <iostream>
#include <vector>
using namespace std;
int main()
{
// 사용자가 입력할 수의 갯수 n변수와 입력한 수를 저장할 number 변수예요.
int n;
int number;
// 컨테이너에 int형이 들어갈 수 있도록 vector 컨테이너를 선언해 주세요.
vector<int> vec;
cin >> n;
// n번 만큼 반복해서 사용자에게 숫자를 입력받고 vector 컨테이너 안에 값을 넣어주세요.
for(int i = 0; i < n; i++) {
cin >> number;
vec.push_back(number);
}
// 저장된 값을 확인해 보세요.
for(int i = 0; i < vec.size(); i++)
cout << vec[i] << " ";
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: