Ad
  • Custom User Avatar

    thank u i see it

  • Custom User Avatar
  • Custom User Avatar

    OP had an off-by-one error in their for loop: loop counter i goes to 14 but the pattern variable has 14 characters, so the last iteration accesses phnum out-of-bounds

  • Custom User Avatar

    The C tests seem fine. Without more information, I'm going to close this issue.

  • Custom User Avatar

    This code is mostly correct. You are using a template string in your return value, and template strings will create exactly what you write in them... so your current return value includes extra quotation marks, extra spaces, and even linebreaks. So, for example, if the correct return value is (123) 456-7890, your function is returning the following (I'm using underscores to show spaces here, your return value does not contain underscores, they are spaces in your return value):

    "(123)__
    __456_-_
    __7890_"
    

    As a further note, you don't need to call the function yourself at the end of the code, the tests will do that for you. In this case, it doesn't matter that you call it yourself, though.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution