#include <fstream> 
#include <iostream> 
using namespace std; 
  
int main() 
{ 
  ifstream fin; 
  fin.open("scores.txt"); 
  if (!fin.good()) throw "I/O error"; 
  
  // create array of user-specified size
  int size; 
  fin >> size; // first line in TXT file 
  fin.ignore(1000, 10); 
  int* score = new int[size]; 
  
  // read and save the scores 
  int i; 
  for (i = 0; i < size; i++) 
  { 
    fin >> score[i]; // remaining lines in TXT file 
    fin.ignore(1000, 10); 
  } // for 
  fin.close(); 
  
  // output the scores to the console
  for (i = 0; i < size; i++) 
    cout << score[i] << ' '; 
  cout << endl; 
 
} // main 
