Hi guys, need help with my homework. It is neccesary to create a function double stepen(double x) that works as follows: every time the function is called with a given number x, it returns the next power of number x, so it returns x^1 for the first time, then x^2 , X^3, x^4, etc. However, when called with another number x, the power is reset to 1.
Use this function to create a function with the following prototype: void stepenuj_niz (double A [], int s [], int length) The function receives a series of real numbers A and a series of natural numbers s that are the same length, and then each member of series A is powered with the exponent given in the corresponding member of string s. You must use the first function in the second function.