Hi i am just learning to code in school and need help with one of my programs I need the program to validate if the phone number given is in the required format and will return if its valid or not.A valid number will also have the following restrictions
- The first digit of the area code cannot be 0 or 1
- the second and third digits may not contain an 8 or a 9
- The fourth digit cannot be 0 or 1.
- The middle and last section can contain any digits (0-9).
(XXX)-XXX-XXXX I know i need to use conditionals to solve this problem and the random generator, im just confused as to how to set up my conditionals
Aucun commentaire:
Enregistrer un commentaire