Files
UVA/2010-06-09/10579.cpp
2018-10-20 23:27:07 +08:00

37 lines
639 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
date:107/10/13
author:Chen Yi Jing
Fibonacci Numbers
1. Fibonacci Numbers 要的很後面只能另尋他路owo
*/
#include <iostream>
using namespace std;
int big_add () {
fib = n1 + n2;
}
int change (int (&n1)[1000]) {
}
int main () {
int n = 0;
while (cin >> n) {
int n1[1000], n2[1000], temp[1000], fib[1000];
if (n == 1)
fib[0] = 1;
else if (n == 2)
fib[0] = 1;
else
while (n > 2) {
cout << fib << endl;
temp = n2;
n2 = fib;
n1 = n2;
n--;
}
}
}