Fahad/MCG-CS/Code/Fibonaci3.kcl
changeset 45 7545b1bc1514
equal deleted inserted replaced
44:a751aa1ee4f7 45:7545b1bc1514
       
     1 var fib = 7;
       
     2 
       
     3 fib = fib + 1;
       
     4 
       
     5 var a = 0;
       
     6 var b = 1;
       
     7 
       
     8 var i = 0;
       
     9 for i = 0 to fib do
       
    10 	var temp = a;
       
    11 	a = b;
       
    12 	b = temp + b;
       
    13 end;
       
    14 
       
    15 print "The result is:";
       
    16 print b;