Ad
  • Default User Avatar

    don't std::cout << sum the result but instead use return sum; opposed to your return 0;
    That's why you'll always get 'Actual: 0' because your functionw ill always return 0 in any case.

  • Custom User Avatar

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

  • Custom User Avatar

    Hey there. First things first, this should be marked as a question, not an issue. Issues are for when you think there is something wrong with the problem itself.

    To answer your first question, usually you will work with what is given to you in the solution window. Changing what is already there can sometimes break a problem.

    If you would like me to take a look at what you currently have, reply with your solution. I won't be able to help you further until then.

  • Custom User Avatar

    Hi,
    Please help, I am new here and using C++,the processes are quite confusing. Do i solve the challenge with my own method or do i go with the way it was writing in the solution window? Also, I solved the problem and it currently bruns on my laptop but when i click on the run sample test button, it gives this error:

    Log:

    es

    Expected: equal to es

    Actual: test