Ad
  • Custom User Avatar

    in C, i'm trying to do the exercice and on the 0 ^ 0 ^ 0 test, it should expect 0 because 0 ^ 0 ^ 0 = 0 ^ (0 ^ 0) = 0 ^ 1 = 0, but it expect one.
    i assume 0 ^ 0 ^ 0 = 0 ^ (0 ^ 0) because it says in the first line of the subject :
    "For a given list [x1, x2, x3, ..., xn] compute the last (decimal) digit of x1 ^ (x2 ^ (x3 ^ (... ^ xn)))."

  • Custom User Avatar

    Great job, though the base % 10 isn't necessary because a digit will always be below 10.