You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
const int N = 40;
|
|
int a[N] = {0, 1, 1};
|
|
|
|
int main() {
|
|
for (int i = 3; i < N; i++)
|
|
a[i] = a[i - 1] + a[i - 2];
|
|
|
|
for (int i = 1; i < N; i++)
|
|
printf("%d\n", a[i]);
|
|
return 0;
|
|
} |