Chinaunix首页 | 论坛 | 博客
  • 博客访问: 540243
  • 博文数量: 156
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1183
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-22 11:42
文章分类

全部博文(156)

文章存档

2015年(67)

2014年(89)

Fab

分类: C#/.net

2014-12-02 18:40:57


  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;

  5. namespace Fab1
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             int[] x = new int[20];
  12.             int i;

  13.             x[0] = 1;
  14.             x[1] = 1;

  15.             for (i = 2; i < 20; i++)
  16.             {
  17.                 x[i] = x[i - 2] + x[i - 1];
  18.             }

  19.             for(i=0; i<20; i++)
  20.             {
  21.                 Console.WriteLine(x[i].ToString() + "\t");
  22.             }

  23.             Console.ReadKey();
  24.         }
  25.     }
  26. }

        

阅读(589) | 评论(0) | 转发(0) |
1

上一篇:九九乘法表

下一篇:getpid

给主人留下些什么吧!~~