File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Java game deal or no deal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java game deal or no deal" Watch "Java game deal or no deal" New topic
Author

Java game deal or no deal

sahmira bi
Greenhorn

Joined: Apr 03, 2006
Posts: 1
hi ppl
iv got a piece of java cwk and have no idea what needs to be done. help???
Welcome to Deal or No Deal
Allocating cash values to boxes... done...
Contestant, please choose a box from 1 to
22.
> 12
Your choice has been successful.
The following cash values still remain:
1p �1000
10p �3000
50p �5000
�1 �10,000
�5 �15,000
�10 �20,000
�50 �35,000
�100 �50,000
�250 �75,000
�500 �100,000
�750 �250,000
The following boxes still remain:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15,
16, 17, 18, 19, 20, 21, 22
Contestant, please choose a box to open:
> 9
Your choice has been successful.
Opening box... the box contains �100.
The following cash values still remain:
1p �1000
10p �3000
50p �5000
�1 �10,000
�5 �15,000
�10 �20,000
�50 �35,000
�50,000
�250 �75,000
�500 �100,000
�750 �250,000

above is the sample output.
Stephen Foy
Ranch Hand

Joined: Oct 17, 2005
Posts: 143
Hi,

Im sure you know how to declare arrays, each value can be stored into an array. Which is possibly the best way.



Hope this gives you a start.


Stephen Foy - Microsoft Application Development Consultant
 
Don't get me started about those stupid light bulbs.
 
subject: Java game deal or no deal
 
Similar Threads
asking about usuage of if with profit calculation
Home loans in India - fixed or floating ?
help for a newbie that's out of her depth!
India's 10 biggest employers
Layout problems!!