Do...While Loop for Input Validation (Java)

preview_player
Показать описание
A simple program that uses a Do...While loop to validate the user's input.
Рекомендации по теме
Комментарии
Автор

Write a program to validate a phone number input by the user. In North America
the number is expected to be a string of 10 digits, while they could in these
formats: 2047773333, (204)777-3333, or 204-777-333. Your program should
output "It is valid" if the 10 digits are in these three formats. Otherwise, it should
output "It is invalid". Your program should keep asking user to input the phone
number until the user types in (exactly) "exit"

kennethbeteryel
Автор

how is this possible when value is less than or equal 0 (value<=0) yet you used 5 which is greater than 0.

doenil
Автор

sorry it was very difficult to hear without turning up my volume

evelyng
Автор

Can someone turn up the snare in my headphone? I can’t hear this guy in his videos!!

jotty