昨天写的代码,不清楚对错。
#include<stdio.h>
int main()
{
int a=7,b=11;
long long int i,n,sum=0;
printf(“no no”);
scanf("%lld",&n);
for(i=3;i<=n;i++)
{
sum=a+b;
a=b;
b=sum;
if(sum%3==0)
{
printf(" yes");
}
else{
printf(" no");
}
}
return 0;
}
11-11
515
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-23
149
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-14
327
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-14
306
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-10
309
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-24
238
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-12
67
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-20
08-20