Get Sequential Text File2

//This program will input from two squential text file

#include <fstream.h>
#include <iostream.h>
#include <stdlib.h>
#include <string.h>

ifstream in_fl; //Declare a file pointer for reading
main()
{

        char in_ch;
        char filename[12];
        char cust[3][10];
        char name[10];
        char trans_stg[10];
        float trans[3][3];
        float sum = 0.0;
        unsigned int c;
        unsigned int k;

        cout << "What file would you like to read : ";
        cin >> filename;
        in_fl.open (filename, ios::out); //Create the sequential (text) file

        in_fl.get (in_ch);

        for ( int n= 0; n <=1; n++)
        {
            c = 0;// intializes the array subscript 

            while ( in_ch != '\n') // checking for return carraige
            { 
                name[c] = in_ch;
                in_fl.get (in_ch);
                c++;// controlling the subscribe of the name array
               }
            name[c] = '\0';

            strcpy(cust[n],name);//After a name is found in data file, it is placed into
                                            // a two dimensional array.

            cout << cust[n] << '\n';
            in_fl.get (in_ch);

//This loop is placing the transactions per person into a two dimesional array
        for ( int j = 0; j <=2; j++)
            {    
                k = 0; // intializes the array subscript 

                while (in_ch != '\n')
                    { 
                        trans_stg[k] = in_ch; // putting characters into number string
                        in_fl.get (in_ch);
                        k++;// controlling the subscribe of the array
                    }
        trans_stg[k] = '\0'; // Putting the null character into number string
        trans[n][j] = atof(trans_stg);// converting number string to an array
        cout << trans[n][j] << '\n';
        in_fl.get (in_ch);
    
        }
}


in_fl.close();// closing the sequential (text) file

return 0;
}
/*
What file would you like to read : trans.dat
Jones
23.56
12.54
234.23
Smith
10.34
25.34
26.33
*/