View Single Post
  #3  
Old 06-09-2005, 10:03 AM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
that'll return every single number thats divisble by 2... ^.^;

// Side note, this is for PHP lol... incase anyone didnt get that

I only want the even NON repeated ones

$d = 32;
for($a = 2; $a <= ($d+ 2); $a+=2){
$var = round($d/$a, 0);
if($var != $var-2){
echo $var."<br>";
}
}

The ouput for that is:

16
8
5 // dont want that
4
3 // nor that
3 // nor that
2 // only once
2 // not 2x
2 // not 3x
2 // not 4x
1 // only once
1 // not the other 5 times
1
1
1
1
1
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net.
Free Teamspeak servers: http://gamersnetwork.us/

Reply With Quote