1. ## Re: Some Calculators

Well: The Denis card shuffler(!), using UBasic:

DIM A(52), B(52) [set up 2 arrays size 52]

w = 52 [used to indicate number of cards left]

LOOP u FROM 1 TO 52 : B(u) = u : NEXT u [fill array B]

LOOP v FROM 1 TO 52
p = INT(RND * w)+1 [p(ick) a number from 1 to w at random]
A(v) = B(p) [enter picked card in shuffled array A]
SWAP B(w),B(p) [switch last value in array B with picked value]
w = w - 1 [update number of cards left]
NEXT v

Array A now contains the shuffled deck.

2. ## Re: Some Calculators

Originally Posted by DenisB
Well: The Denis card shuffler(!), using UBasic:

DIM A(52), B(52) [set up 2 arrays size 52]

w = 52 [used to indicate number of cards left]

LOOP u FROM 1 TO 52 : B(u) = u : NEXT u [fill array B]

LOOP v FROM 1 TO 52
p = INT(RND * w)+1 [p(ick) a number from 1 to w at random]
A(v) = B(p) [enter picked card in shuffled array A]
SWAP B(w),B(p) [switch last value in array B with picked value]
w = w - 1 [update number of cards left]
NEXT v

Array A now contains the shuffled deck.
Mersenne Twister algorithm will give you much better results.

3. ## Re: Some Calculators

The Fibonacci sequence is a series of numbers where the next number is found by adding up the two numbers before it.

Here here a calculator that generate the Fibonacci numbers and calculate the nth element and the sum of the sequence:
Fibonacci Sequence Calculator

Page 2 of 2 First 12