Create Sequential Text File1

//This program will create a two squential text file

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

ofstream fp; //Declare a file pointer for writing
ofstream fp2;
main()
{
        float num;
        fp.open ("names.dat", ios::out); //Create the sequential (text) file
        fp2.open ("names2.dat", ios::out);//Creating a 2nd sequential file

        fp << "abcdef\n"; //writing to the text file
        fp << "ghij\n";
        cout << "hi\n"; // writing to the monitor
        cout << "Please enter a float : ";
        cin >> num;
        fp << num;
        fp2 << "***\n";
        fp2 << 12 + 4;

        fp.close();// closing the sequential (text) file
        fp2.close();//closing the second file

        return 0;
}
/*
hi
Please enter a float : 34.25


names.dat (sequential text file)
abcdef
ghij
34.25

names2.dat (seqential text file)
***
16