EnglishРусский  

   ..

   fibonaccireq.3.g

The project is closed! You can look at a new scripting language. It is available on GitHub.
Also, try our open source cross-platform automation software.

Ads

Installer and installation software
Commercial and Freeware installers.

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 }
31