E.cpp 234 B

123456789101112131415
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int a[21];
  5. a[1] = 1;
  6. a[2] = 1;
  7. cout << a[1] << endl;
  8. cout << a[2] << endl;
  9. for(int i = 3; i <= 20; i++){
  10. a[i] = a[i-1] + a[i-2];
  11. cout << a[i] << endl;
  12. }
  13. return 0;
  14. }