#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
const int TOTAL = 20;
int arr[TOTAL], n;
int i;
cout << "Enter up to 20 int numbers (Quit with a letter):" << endl;
for (i = 0; i < TOTAL && cin >> n; i++)
arr[i] = n;
int last = i;
for (i = 0; i < last; ++i)
cout << arr[i] << ' ';
cout << endl;
return 0;
}
/*
run:
Enter up to 20 int numbers (Quit with a letter):
23
54
982
1
7
q
23 54 982 1 7
*/