Ad
  • Default User Avatar

    the operation of extracting the square root of a number and then squaring
    it can lead to minor rounding errors due to
    working with floating point numbers

  • Custom User Avatar

    rparks52 is right (assuming "p = 1" is "product = 1".)

    This process is called initialization; where a variable is assigned for later parts of the code to use.
    for example : arr = [1, 2, 3, 4, 5]

    1. product = 1
    2. arr[0] --> product = product * 1
    3. product = 1
    4. arr[1] --> product = product * 2
    5. product = 3

    Following this process, regardless of what integers/floats are in the array, they will definitely multiply each other.

  • Default User Avatar

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