Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 18th, 2004, 12:49 PM
JessieH JessieH is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 JessieH User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Java Programming Lotto Number generated

I don't know how to make a Lotto Program that you have to get 6 numbers out of a range of 1 to 49. None must be repeated.
Does anyone have a clue on how to achieve this? The output must be done 5 times in a row.

Reply With Quote
  #2  
Old December 22nd, 2004, 02:00 AM
RodimusT RodimusT is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 5 RodimusT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey

You want 5 sets of 6 randomly generated numbers like this:

1 22 33 44 55 66
2 23 23 42 23 1
2 33 23 42 23 1
2 14 23 42 23 1
2 3 23 42 23 1

If so that can be relatively easily done using a 2 dimensional array and a couple loops.

Reply With Quote
  #3  
Old December 22nd, 2004, 08:11 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I assume you'll wanat to sort the numbers as well...
definately a good looping exercise...

JessieH, have you had a chance to try it yourself yet?
present us with some code and we'll be better off to help ya.

Reply With Quote
  #4  
Old March 22nd, 2005, 01:45 PM
handy handy is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 8 handy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 26 m 15 sec
Reputation Power: 0
java lotto help

can someone help me with a personal project for the lotto

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Java Programming Lotto Number generated


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway