Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Random Maths operations generator

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Thanked 0 Times in 0 Posts

    Default Random Maths operations generator

    Hi, I am writing a program that generates random maths questions for primary schools, but I'm having a problem finding out how to select one of the following characters at random (+ - * /) and to generate questions when any of the characters are selected.
    Please help?

    Thank you.

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 697 Times in 679 Posts

    Default Re: Random Maths operations generator

    Put them in an array and select the possible array indices randomly.

Similar Threads

  1. [SOLVED] Random maths operator generation
    By dk87 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: April 8th, 2013, 06:11 AM
  2. Random Number Generator
    By Rugby_Thompson in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 5th, 2013, 12:58 AM
  3. Random Number Generator Always gives 0
    By tlckl3m3elmo in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 11th, 2012, 03:09 PM
  4. random number generator
    By java3 in forum Loops & Control Statements
    Replies: 4
    Last Post: February 21st, 2011, 12:00 PM
  5. [SOLVED] Random number method implementation
    By big_c in forum Java Theory & Questions
    Replies: 2
    Last Post: April 15th, 2009, 01:10 PM