include iostream using namespace std int main double array 20 cout Ent

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include <iostream>
using namespace std;
int main() {
double array[20], a;
cout << "Enter 'a':" << endl;
cin >> a;
for (int x = 0; x <= 19; ++x) {
array[x] = 1 / (1 + a * (x + 1));
}
for (int x = 0; x <= 19; ++x) {
cout << "array[" << x << "] - " << array[x] << endl;
}
return 0;
}