Ad
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    int largest_five_digits(char *digits)
    {
    int length = sizeof(digits) + 2;
    int gDigits[length], i;
    int max = 0, maxI, maxDigit[5];

    for(i = 0; i < length; i++)
    {
    gDigits[i] = digits[i];
    }

    for(i = 0; i < length - 4; i++)
    {
    if(gDigits[i] > max)
    {
    max = gDigits[i];
    maxI = i;
    }
    }

    for(i = 0; i < length - 4; i++)
    {
    maxDigit[i] = gDigits[maxI + i];
    }

    return maxDigit; // you code here
    }

    Sorry for this kind of question!
    I find the solution, but i can't return it.

  • Custom User Avatar

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

  • Custom User Avatar

    when i tested my code i had got following error. Why?
    solution.c:1:1: error: unknown type name 'y_'
    y_
    ^
    In file included from solution.c:2:
    In file included from /usr/lib/llvm-8/lib/clang/8.0.1/include/stdint.h:61:
    In file included from /usr/include/stdint.h:27:
    /usr/include/x86_64-linux-gnu/bits/types.h:30:1: error: expected identifier or '('
    typedef unsigned char __u_char;
    ^
    2 errors generated.

  • Custom User Avatar

    I couldn't understand well your code in line 6. Please, give me some comments or explanations if you can!

  • Custom User Avatar

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

  • Custom User Avatar

    when i tested my code i passed but when i tried to submit it it failed. Why?