int f(){ static int a1 = 0;static int a2 = 1; //changea1 = a2;return(a2 += 2 * a1 +1);}int main(){int i, sum, f(); for(i = sum = 0; i5; i++) { sum+=f();coutsum = sum'\n'; }} 第三行的输出是()
int f(){ static int a1 = 0;static int a2 = 1; //changea1 = a2;return(a2 += 2 * a1 +1);}int main(){int i, sum, f(); for(i = sum = 0; i5; i++) { sum+=f();coutsum = sum'\n'; }} 第三行的输出是()
正确答案:sum=57
Tag:面向对象程序设计
时间:2021-12-29 13:20:45