int main(void)

    {

    int ans;

    cout << " do you wan't to test your printer? Y/N ";

    cin >> ans;

    if((ans == 'Y') || (ans == 'y'))

        {

        //Open printer stream(PORT)

        ifstream Print("LPT1:");

        //Checking if the printer stream was ope

        //     ned without errors

        if(!Print)

            {

            cout << " Error with the printer...";

            return(-1);

        }

        //Output text as normally

        Print << " Hello, this is a test for your printer" << endl;

        Print << " Did you lear something by taking a look at the code???" << endl;

        //Ejecting page from printer

        Print << '\f';

        //Close printer stream

        Print.close();

    }

    cout << " Test finished...";

    return(0);

}