Skip to content
Advertisement

How to solve this equation with a loop?

This is the sequence:

JavaScript

and actually it’s like this:

JavaScript

for example: -10 = (3 * -1) - 7.

I used this code but it’s not acting like this equation that I have provided.

JavaScript

Advertisement

Answer

This is my solution to finding t(m)

JavaScript

where n[negative number] is a number from the end of the list.

Results in:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement