#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
const int TOTAL = 20;
float arr[TOTAL], n;
int i;
cout << "Enter up to 20 float 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 float numbers (Quit with a letter):
3.14
8.3
7.19
9.1
8.9
1.05
a
3.14 8.3 7.19 9.1 8.9 1.05
*/