Fibonacci_array
//斐波那契数列 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的更多相关文章
随机推荐
- cafee编译错误几个总结
1.CXX/LD -o .build_release/examples/siamese/convert_mnist_siamese_data.bin .build_release/lib/libcaf ...
- 信号single
信号 Django中提供了“信号调度”,用于在框架执行操作时解耦.通俗来讲,就是一些动作发生的时候,信号允许特定的发送者去提醒一些接受者. 1.Django内置信号 Model signals pre ...
- selenium中的上传文件
# 上传文件driver.find_element_by_xpath("//input[@value='上传文件']").send_keys(r"C:\Users\YKD ...
- GoGland 快捷键说明
关于Gogland一些常用快捷键的说明,我在网上没有搜索到,于是乎,我找到了官网中的视频介绍,然后将其中的一部分摘录了出来,希望能帮住大家... Gogland——使用说明前面是苹果|后面是linux ...
- mssqlserver超级班助类 带详细用法
using System; using System.Collections; using System.Collections.Generic; using System.Configuration ...
- CSS效果:焦点图片
HTML: <html lang="en"> <head> <meta charset="UTF-8"> <meta ...
- bind啊你返回的函数到底是个虾米
一般apply().call()和bind()会一起比较. 他们三个都是改变this对象指向的方法. apply()和cal()方法是会立即执行,apply把参数作为数组,call方法接收一个一个的参 ...
- ES6 —— 数组总结
1. map:映射 一个对一个 arr.map(function(item) { ... }) 可以配合箭头函数:arr.map(item => ... ) let arr1 = [1 ...
- Mac 安装Python3 facewap环境
参考网上大神的方法 1 官网下载安装 2 下载指定版本的源码cmake安装 3 Mac上使用homebrew进行安装(强烈推荐,主要是前两种的openssl模块我没有搞定链接什么的一直报错,一个个下载 ...
- Linux环境下nginx集群搭建
#确保安装nginx,stream模块默认不安装的,需要手动添加参数:–with-stream, nginx1.9或以上版本 #nginx.conf文件中,添加以下内容(只供参考),这个不能放在htt ...