重新开始学习C&C++   Courage is resistance to fear, mastery of fear, not abscence of fear  
 //斐波那契数列 Fibonacci数列
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
long f1, f2;
int i;
f1 = f2 = ;
for (i=;i<=;i++)
{
cout << setw() << f1 << setw() << f2;
if (i % == )cout << endl; //每四个数换行
f1 = f1 + f2; //第三个数
f2 = f2 + f1; //第四个数
}
return ;
}

Fibonacci_array的更多相关文章

随机推荐

  1. Intellij idea 2018的注册方式

    激活方式:License Server 第一步: 将地址 http://active.chinapyg.com/ 或者 http://idea.toocruel.net 任意一个复制到License ...

  2. error: ‘module’ object has no attribute ‘_rebuild_tensor_v2’

    import torch._utils try: torch._utils._rebuild_tensor_v2 except AttributeError: def _rebuild_tensor_ ...

  3. Linux:Red Hat系统的安装

    今天高兴,所以我写这一期,这一期写的是Red Hat系统的安装,这个开发系统也是红帽企业制作出来的,关于这款系统的相关资料就自行百度吧!话不多说,直接进入这期的内容吧! 安装Red Hat系统 系统下 ...

  4. 使用Pillow库 创建简单验证码

    使用Pillow生成简单的验证码 本想做成字体各自按随机角度倾斜, 但没有在Pillow中找到相关的方法 import randomfrom PIL import Image, ImageDraw, ...

  5. bottle模板中的替换

    line是模板中一行的内容,类似: {{x}}testinfo{{x+10}} x=10时,模板输出: 10testinfo20 x = 10 splits = re.split(r'\{\{(.*? ...

  6. python笔记1——关于文件的打开与读写

    一.文件的打开与关闭1.open,close函数 #-*- coding:utf-8 -*- # 1.w 写模式,它是不能读的,如果用w模式打开一个已经存在的文件,会清空以前的文件内容,重新写 # w ...

  7. NLP相似度之tf-idf计算

    当然,在学习过程中也是参考了很多其他的资料,代码都是一行一行敲出来的. 一.将多个文件合并成一个文件,避免频繁的打开和关闭 import sys for line in sys.stdin: ss = ...

  8. C#连接字符串

    1."Data Source=服务器名; Initial Catalog=数据库; User ID =用户名; Password=密码; Charset=UTF8; " 2.&qu ...

  9. python vtk 通过回调函数监测键盘”Up”键动作,每按一次方向上键,actor变换一种颜色

    import vtk class KeyPressInteractorStyle(vtk.vtkInteractorStyleTrackballCamera): def __init__(self,p ...

  10. 简单几步,教你学会PHP,新手必看!

    学习php的方法,学东西,永远不要妄想有速成这一说,告诉你了一个方式,但是缺少努力这一环节,那也是白搭.掌握好的学习方法非常必要,看看这篇如何学习PHP培训的方法,在此提醒一下大家,PHP不像别的科目 ...