第20145题 单选
给定C++程序执行后输出的cnt值为多少?
int main()
{
 int a[20],i;
 int cnt=0;
 for(i = 0; i < 20; i++)
 a[i] = i+1;

 for( ; i > 1; i--)
 if((a[i-1]+a[i-2])%3)
 cnt++;
 cout << cnt << endl;

 cout << endl;
 return 0;
}
A

5

B

6

C

10

D

12

程序运行统计
暂无判题统计