#include <iostream>
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a = 0;
cin >> a;
for (int i = 1; i <= a; ++i)
{
cout << i << '\n';
}
return 0;
}
코딩 테스트
#include <iostream>
using namespace std;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a = 0;
cin >> a;
for (int i = 1; i <= a; ++i)
{
cout << i << '\n';
}
return 0;
}