Write a program that reads a telephone number from a file phnum.txt (available in lab folder) in
the form xxx-xxxx. The first three digits represent an area code and the next 4 digits represent
the phone number. Your task is to print these numbers into another file (outFile.txt) without any
space or ‘-’ between the area code and the number. Your program should define a function that
has input and output file streams as arguments.
For example,
If the phone number is 042-5610, the output should be 0425610.

Sorry, we won't just do your homework for you. Please show us what you have tried so far and where you're stuck, and we'll try to help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.