楼上的给 的是C语言版的,我给一个C#版的,不知道你要哪种语言!using System;using System.Collections.Generic;using System.Text;namespace Fibonacci数列前20项{
class Program
{
static void Main(string[] args)
{
int x, y, i;
x = y = 1;
i = 1;
Console.WriteLine("{0}", x);
...
C语言编写的,算法是这样的,要是用其他语言写的话变一变语法就可以了。//打印斐波那契数列的前10项 #include#define MAX 9 int main(){ int fib[MAX],i=2; fib[0]=fib[1]=1; printf("斐波那契数列的前10项是:\n%d\t%d\t",f...