EnglishРусский  

   ..

   fibonaccireq.3.g

Ads

Scriptius script builder
Provides the best choice in work automation and great time saving features.

CreateInstall
Freeware and commercial installers.

Cell Phone Batteries
Batteries Plus offers batteries for laptop, camcorder, cell phone, camera.

Gentee needs your help!
How to advertise with us
 
laptop battery

source\samples\easymath\fibonaccireq.3.g
 1 /******************************************************************************
 2 *
 3 * Copyright (C) 2005, The Gentee Group. All rights reserved. 
 4 * This file is part of the Gentee open source project - http://www.gentee.com. 
 5 * 
 6 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE GENTEE LICENSE ("AGREEMENT"). 
 7 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS 
 8 * ACCEPTANCE OF THE AGREEMENT.
 9 *
10 * ID: fibonaccireq 17.10.06 0.0.A.
11 *
12 * Author: Alexey Krivonogov ( gentee )
13 *
14 ******************************************************************************/
15 
16 func uint fibonacci( uint prevprev prev )
17 {
18    if prev > 2000000000 : return prev
19    print( "\( prev + prevprev )\n" )
20    return fibonacci( prev,  prev + prevprev )
21 }
22 
23 func main<main>
24 {
25    print("This program displays 47 numbers of Fibonacci (Xn = Xn-1 + Xn-2)\n\n")
26 
27    print( "1\n1\n" )
28    fibonacci( 1, 1 )
29    getch()
30 }
Edit