fib.while
changeset 73 27469183da75
child 75 898c25a4e399
equal deleted inserted replaced
72:d65525aeca08 73:27469183da75
       
     1 { n := 9;
       
     2      minus1 := 0;
       
     3      minus2 := 1;
       
     4      temp := 0;
       
     5      while n > 0 do  {
       
     6        temp := minus2;
       
     7        minus2 := minus1 + minus2;
       
     8        minus1 := temp;
       
     9        n := n - 1
       
    10      };
       
    11      fib_res := minus2
       
    12 }