subject

Numbers displayed on the screen must be formatted for readabiity. Think of your phone number, or Social Security number and Credit Card. Write a program that uses a Scanner to take a single user input. If the user enters 9 characters format it as a Social Security Number. It should appears as 123-45-6789 (must have dashes) If the user enters 10 characters format it as a phone number. It should appears as (123)456-7890 (parentheses around area code and a dash. If the user enters 16 characters format it as a credit card number. It should appears as 1234 5678 9012 3456 (use spaces every 4 digits) The user must enter input all numbers and the input must have a length of 9, 10 or 16. If not display an appropriate error message.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:00, cchotshot
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
image
Computers and Technology, 23.06.2019 09:30, blake2001
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, gamingisfun
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
image
Computers and Technology, 24.06.2019 09:50, potatocow
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
You know the right answer?
Numbers displayed on the screen must be formatted for readabiity. Think of your phone number, or Soc...

Questions in other subjects:

Konu
Mathematics, 19.11.2020 01:20
Konu
Chemistry, 19.11.2020 01:20
Konu
Advanced Placement (AP), 19.11.2020 01:20
Konu
Mathematics, 19.11.2020 01:20
Konu
Social Studies, 19.11.2020 01:20