I can't get cin to take a type float from the keyboard. I am entering them into an array with a for loop but when I put an 'f' at the end to indicate a type float I get kicked out of the loop. If I just initialize the array with '10.2f' for example it works fine.???

#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cctype>
using namespace std;

const int ELEMENTS = 10;
void arySorter(float *p, size_t n);

int main()
{
int i;
float ary2Sort[ELEMENTS]/* = {12.2f,1.1f,9.9f,2.2f,6.6f,44.4f,7.7f,3.3f,5.5f,4. 4f}*/;
float *sortPtr;
sortPtr = ary2Sort; // init sortPtr

for(i = 0; i < ELEMENTS; ++i) { //get numbers
cout << "Enter a number to be sorted: " << endl;
cin >> ary2Sort[i];
}

cout << "\nPrint unsorted array" << endl;

for(i = 0; i < ELEMENTS; i++) // print the array
cout << ary2Sort[i] << endl;