2015年12月23日

编程题

摘要: 1.[编程题] 斐波那契数列大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项。class Solution {public:int Fibonacci(int n) {int f = 0, g = 1; while(n--) { g += f; f =... 阅读全文

posted @ 2015-12-23 11:03 泽口靖子 阅读(163) 评论(0) 推荐(0)

解题的小问题(C++)

摘要: 1.判断一个数是否为整数 if(m==(int)m)2.#include using namespace std;int main(){ int n,m; scanf("%d%d",&n,&m); int a[n]; float count = 0; for(int i = 0; i count)... 阅读全文

posted @ 2015-12-23 10:13 泽口靖子 阅读(161) 评论(0) 推荐(0)

导航