Welcome to Gaia! ::

Reply The Literate Role Player's Association
OOC Chat: Electric Boogaloo! Goto Page: [] [<<] [<<] [<] 1 2 3 ... 554 555 556 557 558 559 ... 734 735 736 737 [>] [>>] [>>] [»|]

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

Jarlaxle Baenre

PostPosted: Sun Mar 26, 2006 5:23 pm


Stayin' alive, stayin' alive!
PostPosted: Sun Mar 26, 2006 6:55 pm


Val, what IS that vine-looking thing sticking out of the side of your head??

JettMicheyl


RogueKazimeras
Vice Captain

PostPosted: Sun Mar 26, 2006 6:56 pm


The hilt of a sword.
PostPosted: Sun Mar 26, 2006 11:24 pm


Jarlaxle Baenre
You guys have never experienced tetris like I have.

I played tetris, on a graphing calculator, while my nerd/band geek friends were watching me and at the same time playing the tetris theme. It was awesome.


Try rockin' out to Korobeiniki (Music A on the Game Boy cart from god knows how long ago) by Ozma while you and your buddies get in intense multiplayer tournaments that end in violence.

That's ********' Tetris.

Soloist


shazzer
Captain

PostPosted: Mon Mar 27, 2006 12:58 pm


CATS is eating all my time.

Skimbleshanks' song totally rocks my glock. Well, actually, it's more on the xylo, but it still rocks. And 13/8 time is fun, when you get used to it.

Also, I get two solos in Macavity's song. >D

I bet I'm the only person who plays the glockenspiel well and admits to it.
PostPosted: Mon Mar 27, 2006 1:57 pm


xd Rocks your glock, huh?

I would love a Glock. 18C.

RogueKazimeras
Vice Captain


Jarlaxle Baenre

PostPosted: Mon Mar 27, 2006 6:30 pm


List all the names that rhyme with glock. Yes, even the slang ones.
PostPosted: Mon Mar 27, 2006 6:35 pm


I need help. >.<

I have to create a java program that displays all the prime numbers between 1 and 100 for the fourth part of some assignment. All I've got worked out is:

int i;
for (i = 2; i <=100; i++) //one is not a prime
{
if (something that returns true if the number is a prime)
System.out.println(i);
}

Yeah, so... a control variable. GREAT. (Ignore any errors that'd come up in a compiler, it's a fragment and I just typed it up like, now.)

Argh... how can I test whether or not something is a prime number?

shazzer
Captain


Jarlaxle Baenre

PostPosted: Mon Mar 27, 2006 7:06 pm


Create a temp integer (but an array is better in my opinnion) and store all numbers in that integer.

Then create an "if" condition within a loop, and check if that number devides only by itself (the integer) and by one. First you'd check if any of the numbers return a remainder greater than 0, then you'd check if the number is equal to the integer and one.
PostPosted: Mon Mar 27, 2006 8:50 pm


Simple method to check if a number is prime

Assume you have a placeholder integer in each execution of your first for loop and a boolean saying that the number is initially prime (X and prime in this case) you can nest a second for loop inside your first one to divide the number by all numbers between 1 and whatever the number is. If ever a modulus value returns 0, you know that the number isn't prime. The code would look as follows


for (int i = 2; i <=100; i++) {
aaaaaboolean prime = true;
aaaaaint x = i;
aaaaafor (int j = 2; j <= x-1; j++) {
aaaaaaaaaaif ( x % j == 0) {
aaaaaaaaaaaaaaaboolean prime = false;
aaaaaaaaaa}
aaaaa}
aaaaaif (prime == true) {
aaaaaaaaaasystem.out.prntln(x);
aaaaa}
}

This is by no means the most effective or efficient way to get the job done, but, it is a simple adaptation of your code to make it work.

P.S. Don't directly copy paste this code, I used the letter A in a white font to make the formatting work. But other than that you're welcome to it. I won't tell ~.^

Edit: Heheh. Whoops! If you checked the code before 1:30 AM Eastern time, I forgot an equals sign in the second for loop signature that was rather critical to the math working out. I've since corrected it and the code is ready for use sweatdrop

Soloist


Jarlaxle Baenre

PostPosted: Mon Mar 27, 2006 10:01 pm


I still think that it's better to do it through an array.
PostPosted: Tue Mar 28, 2006 1:46 pm


Thanks a lot. I can adapt it a little and finish up that stupid assignment.

>.>

Only six more assignments to go, and three more tests, and I'm done with my "self-paced learning" course. I suspect I'll be done in April, and I might spend half of May working on some extra credit stuff (just because I can).

I don't get out of school until June. sweatdrop

shazzer
Captain


Jarlaxle Baenre

PostPosted: Tue Mar 28, 2006 2:43 pm


The AP Exams are the second of May.
PostPosted: Tue Mar 28, 2006 3:51 pm


Hmm...

Rock, block, sock, dock, crock, knock, Spock, flock, frocke, stock, clock...

That's all I can think of.

Code = Teh confusing.

Uhhh...

AP Exams are going to suck. I'll have four. AP Psychology, AP German Language, AP English Literature, and AP European History.

I'll just have to hope they're all in the same area, or else I'm ********. -.-

RogueKazimeras
Vice Captain


Jarlaxle Baenre

PostPosted: Tue Mar 28, 2006 4:47 pm


I decided not to take the Stats exam this year as it so happens that I have Java followed by Stats. My brain will be friend after the first one. I don't need another four hours of Stats testing.
Reply
The Literate Role Player's Association

Goto Page: [] [<<] [<<] [<] 1 2 3 ... 554 555 556 557 558 559 ... 734 735 736 737 [>] [>>] [>>] [»|]
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum