Results 1 to 5 of 5
Thread: Generates random maths questions
- 07-31-2007, 05:11 AM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
- 07-31-2007, 07:51 AM #2
Member
- Join Date
- Jul 2007
- Posts
- 10
- Rep Power
- 0
hi cachi
do one thing convert characters in string[]
and from that u can get your charactor randomly
with help of equals method u can get apropriate operator
ok
- 07-31-2007, 02:09 PM #3
Senior Member
- Join Date
- Jul 2007
- Posts
- 135
- Rep Power
- 0
Do what was previously stated and use Random.nextInt(4). It will return you either 0,1,2 or 3. You can use that to get one of the symbols from the array.
- 08-01-2007, 04:39 AM #4
Member
- Join Date
- Aug 2007
- Posts
- 15
- Rep Power
- 0
yes, so to further explain that, it means that
if (x=0)
{
selectedSymbol=plus;
}
...etc
- 08-01-2007, 04:48 AM #5
Senior Member
- Join Date
- Jul 2007
- Posts
- 135
- Rep Power
- 0
Similar Threads
-
random numbers without random class`
By carlos123 in forum New To JavaReplies: 4Last Post: 01-17-2008, 10:44 PM -
Just a Few Questions
By pringle in forum New To JavaReplies: 21Last Post: 01-09-2008, 06:21 PM -
Maths table.. what am I doing wrong (probably everything!! :p )
By ad0m in forum New To JavaReplies: 15Last Post: 11-30-2007, 05:19 PM -
questions
By Gilgamesh in forum New To JavaReplies: 3Last Post: 11-27-2007, 11:18 PM -
3 Questions
By hiranya in forum AWT / SwingReplies: 4Last Post: 11-14-2007, 04:57 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks