Saturday, July 20, 2013

Fibonacci sequence/numbers

As I said before art is a source of knowledge and geometry. Art is a science. The flowers pedals are created by Fibonacci sequence. I recently was asked to write C/C++ for Fibonacci sequences in 1 line of code. Toi co lan da noi nghe thuat la tong hop cua kien thuc va hinh hoc/dai so. Gan day toi co viet phan mem ve Fibonacci circular arcs, nhg canh hoa/van vat dc tao hoa tao ra phan lon theo Fibonacci sequences or numbers. Education has to be fun and interest like playing a video game and we should tell the reason why? As you see the video you can tell how important is Fibonacci sequence effects in the creation of things around us. Hoc de biet no lam gi?, cai khuyen diem lon nhat o VN chi biet hoc de lam gi, mot dinh luat no huu dung no giup minh lam dc gi trong nghanh chuyen mon ma minh da chon the nao it nhat fai noi len ly do?
In mathematics, the Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers in the following integer sequence:[1][2]
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144... (sequence A000045 in OEIS)
By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two.
#include <iostream>
using namespace std; 
//write the fibonacci sequences in 1 line of code.
unsigned int fibonacci(unsigned int n)
{
 return n < 2 ? n : fibonacci(n-1) + fibonacci(n-2);
}
int main()
{
  unsigned l;
  cout << "type a number:";
  cin >> l;
  cout << "number " << l << " fibo is " << fibonacci(l) << endl;
  return 0;
}
“Philosophy (nature) is written in that great book which ever lies before our eyes. I mean the universe, but we cannot understand it if we do not first learn the language and grasp the symbols in which it is written. The book is written in the mathematical language, and the symbols are triangles, circles and other geometrical figures, without whose help it is humanly impossible to comprehend a single word of it, and without which one wanders in vain through a dark labyrinth.” - Galileo Galilei