Results 1 to 2 of 2
Thread: Help with math in java
- 08-06-2007, 04:57 AM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
Help with math in java
Hi, I have written a simple calc that displays times tables or it generates random problems of different operators (i.e., + - x /).
The problem is the random numbers that are generated do not always result in an integer answer, so u get problems like 10 / 7 = 1. If i use doubles the answer is 1.42857, but this is for a forth class student so i only want problems that will result in an integer answer that is correct not like 10 / 7 = 1.
Apart from this my first console attempt works fine just need to adapt to applet.
Thanks.
- 08-06-2007, 06:05 AM #2
Senior Member
- Join Date
- Jul 2007
- Posts
- 135
- Rep Power
- 0
Similar Threads
-
Math Class
By ritwik07 in forum New To JavaReplies: 2Last Post: 09-14-2009, 04:06 PM -
Java Math
By levent in forum Java TutorialReplies: 1Last Post: 05-12-2008, 09:03 AM -
java.lang.Math
By eva in forum New To JavaReplies: 2Last Post: 01-31-2008, 04:17 PM -
Math.Random
By Java Tip in forum Java TipReplies: 0Last Post: 11-23-2007, 02:09 PM -
Date math
By orchid in forum New To JavaReplies: 2Last Post: 04-18-2007, 07:01 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks