1,1,2,3,5,8从第三个数开始每个数是前两个数之合怎么编写程序
1,1,2,3,5,8从第三个数开始每个数是前两个数之合请问大神怎么编写啊?我是个编程小白,这是老师布置的作业
int a = 1, b = 0; while (b < 100) { a += b; b += a; cout << a << " " << b << " "; }
[此贴子已经被作者于2017-12-15 02:15编辑过]
[此贴子已经被作者于2017-12-18 20:36编辑过]