- #1
Cinimod
- 34
- 0
I can't see what is wrong with this code, but for some reason it doesn't work. It compiles, just doesn't do what it should.
I have defined delx as an array, with n elements, and just want to fill the array with evenly spaced values from 0 to n. When I try running it, it says that all elements of the array are 0. Any chance someone could explain to me where the problem is.
Code:
for(i=0; i<n; i++)
{
delx[i] = i/n;
}
I have defined delx as an array, with n elements, and just want to fill the array with evenly spaced values from 0 to n. When I try running it, it says that all elements of the array are 0. Any chance someone could explain to me where the problem is.