Check out example codes for "select elements from array C++". It will help you in understanding the concepts better.

Code Example 1

double X[100];

for (int i = 0; i < 98; i++) {
  X[i+1] = r*X[i]*(1.0-X[i]);
  myfile << X[i] << endl;
}

Learn ReactJs, React Native from akashmittal.com