Computer Science Canada booleans |
Author: | kevin Noronha [ Sat Mar 08, 2008 8:29 pm ] |
Post subject: | booleans |
umm...anyone know how i can check, if when i divide 2 integers, if they are integers or not? here is the code import java.util.*; class Factors{ public static HashSet primes(int high){ HashSet primeset=new HashSet(); for(int i=0;i>high;i++){ if ((i/2)!=Integer){ primeset.add(i); } } } } |
Author: | Clayton [ Sat Mar 08, 2008 8:34 pm ] |
Post subject: | RE:booleans |
Check if the value returned is equal to the value returned casted to an int? |
Author: | A.J [ Sat Mar 08, 2008 9:04 pm ] |
Post subject: | Re: booleans |
to check if x is an integer, round(x) must equal to x. |
Author: | HeavenAgain [ Sat Mar 08, 2008 9:24 pm ] | ||
Post subject: | RE:booleans | ||
why not just
|