Hello there is a problem (z = x^3 - 2.5 xy + 1.78 x^2 - 2.5 y + 1) calculate values of the function at any values of x,y ?

here is my code

here is my code

```
var arr = [];
for (var i = 0; i < 10; i++) {
arr[i] = [];
}
var z = 0;
for (var x = 0; x < 15; x++) {
for (var y = 0; y < 12; y++) {
z = Math.pow(x,3) - 2.5 * x * y + 1.78 * Math.pow(x,2) - 2.5 * y + 1;
arr[x][y] = z;
}
}
```

asked June 14th 19 at 21:05

1 answer

answered on June 14th 19 at 21:07

Initially creates an array of 10 elements, and then in the loop x varies on the interval [0, 14]

Find more questions by tags JavaScript