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.


>> REGISTER NOW TO START POSTING


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

Results 1 to 3 of 3

Thread: help me .. about creating random numbers

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

    Default help me .. about creating random numbers

    I want a program that create an array of random numbers between 1 and 50 , and prints a histogram which display how many integers are in each 'decade' ( use a star for each decade ), as it shown down:

    the output
    -------------------------------------------------------------
    How many random numbers?
    20

    6 26 48 13 48 28 10 28 32 45 18 21 3 7 30 9 38 3 36 15
    1-10 |******
    11-20 |***
    21-30 |****
    31-40 |****
    41-50 |***
    --------------------------------------------------------------

    plz help me I'll be thankful


  2. #2
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    472
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: help me .. about creating random numbers

    Why not just write one?

  3. #3
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: help me .. about creating random numbers

    What have you done (aka code, thoughts on how to accomplish the task)?

Similar Threads

  1. How To: Add line numbers to your JTextArea
    By Freaky Chris in forum Java Swing Tutorials
    Replies: 11
    Last Post: October 15th, 2013, 10:22 PM
  2. Generation of random number using random class
    By JavaPF in forum Java SE API Tutorials
    Replies: 1
    Last Post: December 7th, 2011, 05:46 PM
  3. Roman Numbers
    By chronoz13 in forum What's Wrong With My Code?
    Replies: 14
    Last Post: December 12th, 2009, 02:19 AM
  4. Random numbers
    By Pooja Deshpande in forum Java SE APIs
    Replies: 8
    Last Post: June 5th, 2009, 04:36 AM