123456789
fstream file("file.txt"); // open file while(file.good()) // loop until EOF is not reached { float num; file >>num; // get number from file cout <<num<<endl; }