Ad
  • Custom User Avatar

    You must import the directives --> using System to be able to do so.

    Anyhow, OP solved it, closing.

  • Custom User Avatar

    The problem is that on your very first line you're trying to assign an integer "n" to be the length of a string. Also, you have "n" as just an integer right now, not an array of integers.

    So, you need to figure out how to convert a string into an array of integers.

    Here is one algorithm that could accomplish that:

    1. Convert a string into an array of characters
    2. Convert the array of characters into an array of integers
    3. Compare the contents of the array of integers to find the largest and smallest
    4. Return the result

    It looks like you have a handle on how to do steps 3 and 4, but you're missing steps 1 and 2.