File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Help with some Math please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help with some Math please" Watch "Help with some Math please" New topic

Help with some Math please

Omar Nasir

Joined: Jul 11, 2005
Posts: 5
Hey guys,

I need some help.

Lets say im trying to code a simple game, where I have 4 random numbers, and the player has to:

1) Add, subtract, multiply or divide all 4 numbers with each other to get the number 21.

2) Number can only be used once.

How would i go about with that algorithm?

Thanks, have a nice day

javaNoob me = new javaNoob();<br />String i = "i";<br />i += "love java!";
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

This isn't applet-related, just a general Java question. So let's move it over there...
David Newton

Joined: Sep 29, 2008
Posts: 12617

What have you tried/gotten so far?
I agree. Here's the link:
subject: Help with some Math please
It's not a secret anymore!