Question: How do you solve this ? create a program that when you enter SSN digits ( DDDDDDDDD ) string and formats it into: ( DDD-DD-DDDD
How do you solve this ?
create a program that when you enter SSN digits (DDDDDDDDD) string and formats it into: (DDD-DD-DDDD)
Noticed: the program must take the input as a string
this is example:
when you enter "290452089" than the program should output like: 290-45-2089"
when you enter "782464893" than the program should output like: 782-46-4893"
The program does not accept lengths longer than 9 digits, and not accept social security number which contain non-numeric characters
example:
when you enter "29843" than the program should output like "SSN must contain 9 numbers"
when you enter"eqdQ4eP" than the program should output like "SSN must be all numeric."
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
