(15 XP) A function that formats an integer array into a phone number.
- Fork this repository to your GitHub account.
- Open solution file in Visual Studio.
- Open file
PhoneNumbers.cs
. - Implement the method
FormatPhoneNumber(int[] numbers)
that takes an array of 10 integers and formats them into a phone number. - Run with
CTRL+F5
to test it. - If all tests are passed, commit & sync your repository.
- Send a link to your repository for Lab Master (in #slack) to check it.
FormatPhoneNumber(new int[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }) ➞ "(123) 456-7890"
FormatPhoneNumber(new int[]{ 5, 1, 9, 5, 5, 5, 4, 4, 6, 8 }) ➞ "(519) 555-4468"
FormatPhoneNumber(new int[]{ 3, 4, 5, 5, 0, 1, 2, 5, 2, 7 }) ➞ "(345) 501-2527"