第1题
第2题
include <stdio.h>
int fun(int x)
{ static int t=0;
return(t+=x);
}
main()
int s,i;
for(i=1 ;i<=5;i++) s=fun(i);
printf("%d\n",s);
第3题
A.1
B.3
C.7
D.10
第4题
A.4
B.1
C.0
D.8
第5题
A.11
B.21
C.6
D.120
第6题
#include<stdio.h>
int fun(int x)
{ int a;
if(x==0‖x==1)
return 3;
else
a=x-fun(x-2) ;
return a;
}
void main()
{ printf("%d",fun(7) );
}
A.2
B.8
C.9
D.5
第7题
A.2
B.8
C.9
D.5
第8题
#include <stdio.h>
int fun(int x)
{ static int t=0;
return(t+=x);
}
main()
{ int s,i;
for(i=1;i<=5;i++) s=fun(i);
printf("%d\n",s);
}
第9题
#include <stdio.h>
int fun()
{ static int x=1;
x*=2;
return x;
}
main()
{ int i,s=1;
for(i=1;i<=3;i++) s*=fun();
printf("%d\n",s);
}
程序运行后的输出结果是
A)0
B)10
C)30
D)64
第10题
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!