请高手帮忙看看 谢谢
一、以下是程序的描述:Problem Description
There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).
Input
Input consists of a sequence of lines, each containing an integer n. (n < 1,000,000).
Output
Print the word "yes" if 3 divide evenly into F(n).
Print the word "no" if not.
Sample Input
0
1
2
3
4
5
Sample Output
no
no
yes
no
no
no
二、以下是我的程序:
#include<stdio.h>
#include<stdlib.h>
#define N 100000
int main()
{
int n,i,a[N];
a[0]=7;
a[1]=11;
for(i=2;i<N;i++)
a[i]=a[i-2]+a[i-1];
while(scanf("%d",&n)!=EOF)
{
if(a[n]%3) printf("no\n");
else printf("yes\n");
}
system("pause");
return 0;
}
三、以下是我编的程序 提交后的错误信息:
这程序的错误提示是:Runtime Error
(ACCESS_VIOLATION)
请帮忙看看