Page 1 of 1

Exercise 2: [12 marks] Write a java program named SSN.java that prompts the user to enter a Social Security Number in fo

Posted: Sun Jul 03, 2022 9:58 am
by answerhappygod
Exercise 2 12 Marks Write A Java Program Named Ssn Java That Prompts The User To Enter A Social Security Number In Fo 1
Exercise 2 12 Marks Write A Java Program Named Ssn Java That Prompts The User To Enter A Social Security Number In Fo 1 (34.83 KiB) Viewed 20 times
Exercise 2 12 Marks Write A Java Program Named Ssn Java That Prompts The User To Enter A Social Security Number In Fo 2
Exercise 2 12 Marks Write A Java Program Named Ssn Java That Prompts The User To Enter A Social Security Number In Fo 2 (34.83 KiB) Viewed 20 times
Exercise 2: [12 marks] Write a java program named SSN.java that prompts the user to enter a Social Security Number in format of DDD-DDD-DDD, where D is a digit. The first digit cannot be zero. Make sure that second set of three digits is more than 100. Your program should check whether the input is valid. Here are sample runs: Enter a SSN: 123-268-097 123-268-097 is a valid social security number Enter a SSN: 023-289-097 023-289-097 is an invalid social security number Enter a SSN: 198-068-097 198-068-097 is an invalid social security number Enter a SSN: 198-1680-97 198-1688-97 is an invalid social security number