#include <stdio.h> main(){ int m,i; __int64 a[90]; a[0] = 1;a[1] =2; for(i = 2;i<90;i++) a[i] = a[i-1]+a[i-2]; while(scanf("%d",&m)!=EOF){ if(m == 0) break; printf("%lld\n",a[m-1]); } return 0; } /* Main.c:2:1: warning: return type defaults to 'int' main(){ ^ Main.c: In function 'main': Main.c:4:2: error: unknown type name '__int64' __int64 a[90]; ^ Main.c:11:3: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=] printf("%lld\n",a[m-1]); ^ */ |
Double click to view unformatted code.