#include <stdio.h> int main(){ int n,i; while(scanf("%d",&n)!=EOF){ if(n==1) printf("1\n"); else if(n==2) printf("2\n"); else{ int a[n+1]; a[1]=1,a[2]=2; for(i=3;i<=n;i++) a[i]=a[i-1]+a[i-2]; printf("%d\n",a[n]); } } return 0; }(•̀ᴗ•́)و
#include <stdio.h> int main(){ int n,i; while(scanf("%d",&n)!=EOF){ if(n==1) printf("1\n"); else if(n==2) printf("2\n"); else{ int a[n+1]; a[1]=1,a[2]=2; for(i=3;i<=n;i++) a[i]=a[i-1]+a[i-2]; printf("%d\n",a[n]); } } return 0; }(•̀ᴗ•́)و