Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
Like Tree1Thanks

Thread: Some Calculators

  1. #16
    MHF Contributor
    Joined
    Feb 2015
    From
    Ottawa Ontario
    Posts
    1,652
    Thanks
    310

    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.
    Follow Math Help Forum on Facebook and Google+

  2. #17
    Newbie
    Joined
    Feb 2016
    From
    USA
    Posts
    15

    Re: Some Calculators

    Quote Originally Posted by DenisB View Post
    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.
    Follow Math Help Forum on Facebook and Google+

  3. #18
    Newbie
    Joined
    Feb 2016
    From
    USA
    Posts
    15

    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
    Follow Math Help Forum on Facebook and Google+

Page 2 of 2 FirstFirst 12

Similar Math Help Forum Discussions

  1. fractional exponents - without calculators
    Posted in the Algebra Forum
    Replies: 12
    Last Post: Apr 16th 2016, 05:55 PM
  2. basic and scientific calculators
    Posted in the New Users Forum
    Replies: 0
    Last Post: Aug 31st 2012, 07:39 AM
  3. Im Looking to Buy Used Calculators
    Posted in the Calculators Forum
    Replies: 0
    Last Post: Jul 5th 2011, 11:06 AM
  4. Anyone know anything about TI calculators...?
    Posted in the Calculators Forum
    Replies: 1
    Last Post: Dec 10th 2008, 10:16 AM
  5. Casio Calculators
    Posted in the Calculators Forum
    Replies: 7
    Last Post: Aug 24th 2006, 11:42 PM

Search Tags


/mathhelpforum @mathhelpforum