0

Phone number to accept 11 digit number only

Hi good day to all I just want to ask for help about storing 11 digit phone number and if the phone number inputted by the user is only 10 or 12 it will ask again for the 11 digit phone number. For C Language. Thank you.🙏

12th Jun 2022, 12:08 PM
raf
raf - avatar
2 Antworten
+ 3
If (number.length !== 11){ alert('Must contain 11 digits'); } That will work on JavaScript. You didn't specify the language.
12th Jun 2022, 12:18 PM
PyrEnd
PyrEnd - avatar
+ 1
sorry about that sir i forgot ...its for c language
12th Jun 2022, 12:37 PM
raf
raf - avatar