two nights of ..........nothing hehe

Sep 01, 2005 23:36

Click here.
Take the quiz.
Post your results.
See zspark2burn's results. )

Leave a comment

Comments 13

adamatomic41 September 2 2005, 14:18:32 UTC
Happy Birthday, Izzy's Dad.

Reply

thanx zspark2burn September 2 2005, 14:23:40 UTC
thnx man ill tell him u sai that hehe

Reply


irukamomoko September 2 2005, 16:57:25 UTC
hated the suvey. :P
OMG, MELISSA??????????????????????????? WHY DIDN'T YOU CALL ME?? *SMACK* How the heck is she? What is she doing now? Still in Athens? Wow... man, Melissa... wow

Reply


aptharper September 3 2005, 00:06:01 UTC
I like how I'm an asian guy with purple eyes from Alaska with whom you disagree about nearly everything. That's leaving off the getting killed with a stapler and fusing with Shaun...

Reply


Yo. anonymous September 5 2005, 19:58:43 UTC
I sent you that code. Did you get it? Any particular questions?

-- Alex

Reply

Re: Yo. zspark2burn September 5 2005, 21:53:47 UTC
yes i got it but honestly i didnt understand it much :-\ it s not the kind of java i have learned til this point. I found a diff code to do it with and it worked but its more complicated this is what i used:

import java.util.Scanner;

public class Circle
{
public static void main (String [] args)
{
String inputString;

int Radius = 5;
final double Pi = 3.14159;
double area = Pi * Radius * Radius;
double cir = 2 * Pi * Radius;

System.out.println("A Circle with Radii:");
Scanner scan = new Scanner (System.in);
Radius = scan.nextInt();

System.out.println ("Has an area of " + area);
System.out.println ("and a Circumference of " + cir);

Radius = 10;
area = Radius * Radius * Pi;
cir = 2 * Pi * Radius;

System.out.println("A Circle with Radii:");
Radius = scan.nextInt(10);
System.out.println ("Has an area of " + area);
System.out.println ("and a circumference of " + cir);

}
}

Reply

Re: Yo. zspark2burn September 5 2005, 21:55:21 UTC
although i really do want to find an easier way, i wasnt able to overide the radius for the 10 so i just entered a new one. do you know how i can overide it so dont have to put it again.

Reply

Re: Yo. anonymous September 5 2005, 22:55:56 UTC
Sorry, I'm not sure I quite understand the question. Rephrase?

-- Alex

Reply


P.P.S. anonymous September 5 2005, 23:02:10 UTC
Also, at all costs, force yourself to learn good indentation habits early (I realise LJ formatting isn't representative of your conventions). Some CS grads fall into the habit of not indenting or adequately spacing their code, and end up writing obfuscated garbage like:

char *i;
for(i=ptr;*i!='\0'&&isspace(*i);*i++=*ptr++)

What the hell? Yeah, I know. The basic idea is: If you won't be able to understand what your code does at 3 AM, with 24 hours of no sleep, 2 months later, you probably didn't format it correctly.

Better:

char *i;

for(i = ptr; *i != '\0' && isspace(*i); *i ++)

Get into good habits early. Indent all code blocks within braces with hard tabs. If you make them second-nature, you won't have problems down the road. Also, professors sometimes mark off for poor readability or other stylistic concerns.

Reply

Re: P.P.S. zspark2burn September 6 2005, 06:45:02 UTC
o yes ive found out the cost of not indenting but i do indent i just didnt wanna take the time to use HTML tags to indent the Java code too much code for me. but thank you i will talk to you again soon and see how u can help me more ^^^^im guessing whats above is C? cause if its java i really havent got that far yet hehe thank you very much though

Reply

Re: P.P.S. anonymous September 6 2005, 06:57:13 UTC
Yep, it's C. My message says as much. :)

-- Alex

Reply


Leave a comment

Up