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

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!