Question: Write a program that takes an integer input representing a fictitious 9-digit Social Security Number (SSN) and formats it with hyphens. The output should be
For example, if the input is 123456789, the program should output:
123-45-6789
Your program should handle inputs that are valid 9-digit Social Security Numbers, and it should format them as specified.
Constraints:
The input is an integer representing a fictitious 9-digit Social Security Number (SSN).
The input will always be a valid 9-digit SSN.
The output should be in the format "XXX-XX-XXXX," where "XXX" represents the first three digits, "XX" represents the next two digits, and "XXXX" represents the last four digits.
Step by Step Solution
There are 3 Steps involved in it
This question is complete and requires the writing of a basic program that handles and formats a giv... View full answer
Get step-by-step solutions from verified subject matter experts
