0
Show the following series using loop: 1 1 2 2 4 7 11
Show the following series using loop: 1 1 2 2 4 7 11
1 Resposta
+ 2
int arrLen;
cout << "Enter lenght of series: ";
cin >> arrLen;
cout << 1 << " ";
int temp = 1;
for (int i = 0; i < arrLen; i++){
temp = i + temp;
cout << temp << " ";
}