单选题 C语言
题号 #3248018

请在函数fun的横线上应填写下面选项那个语句式,使从键盘上输入一个整数n,输出斐波数列,如:0 1 1 2 3 5 8 13………
#include <stdio.h>
int fun(int n);
main()
{ int i, n = 0;
scanf("%d", &n);
for (i=0; i<n; i++)
printf("%d ", fun(i));
}
int fun(int n)
{
if (n==0)
return 0;
else if (n==1)
return 1;
else
return _______
}

进入在线模考

参考答案

D

答案解析

暂无解析

你可能感兴趣的试题

A.存在的
B.可直接存取的
C.不可见的
D.不可直接存取的
A.所在文件的全部范围
B.所在程序的全部范围
C.所在函数的全部范围
D.由具体定义位置和extem说明来决定范围
A.int a;
B.auto int a;
C.static int a;
D.register int a;
找试题 · 找答案 · 找资料 在线模考