Question: Use C+t Write a program called telephone.cpp that reads a telephone number from a file called number.dat. This program should determine whether the first input

 Use C+t Write a program called telephone.cpp that reads a telephone

Use C+t Write a program called telephone.cpp that reads a telephone number from a file called number.dat. This program should determine whether the first input from the file is a valid telephone number. A valid telephone number has the following syntax: NNN -NNN-NNN N: the first N can't be a zero (0) Must have the two . Can't contain any letters. Must have 10 numbers and 2 dashes. If the telephone number is valid, the program should print the telephone number followed by a colon (:) followed by a space and the word Valid. If the telephone number is invalid, the program should print the telephone number follow by a colon (:) followed by a space and the words Not Valid and ask for another telephone number but this time the input should come from the keyboard. The programs should keep ask until the telephone number is valid. Use C+t Write a program called telephone.cpp that reads a telephone number from a file called number.dat. This program should determine whether the first input from the file is a valid telephone number. A valid telephone number has the following syntax: NNN -NNN-NNN N: the first N can't be a zero (0) Must have the two . Can't contain any letters. Must have 10 numbers and 2 dashes. If the telephone number is valid, the program should print the telephone number followed by a colon (:) followed by a space and the word Valid. If the telephone number is invalid, the program should print the telephone number follow by a colon (:) followed by a space and the words Not Valid and ask for another telephone number but this time the input should come from the keyboard. The programs should keep ask until the telephone number is valid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!