long MathFibonacci(int f_number) // numer elementu ciągu Fibonacciego { int a=0,b=0,i=1,result=0; //--- if(f_number<0) return -1; if(f_number==0) return 0; if(f_number==1) return 1; if(f_number>1) { result=1; while(i<f_number) { i++; a=b; b=result; result=a+b; } } return result; }