include iostream include math using namespace std int main double arra

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