Omg! I got it, thanks to you both. Why I added i++ to my if statements I'll never know, no duh it was adding an extra i, I did it manually! Face palming incredibly hard, feel like maybe someone...
Type: Posts; User: ChicoTheMan94
Omg! I got it, thanks to you both. Why I added i++ to my if statements I'll never know, no duh it was adding an extra i, I did it manually! Face palming incredibly hard, feel like maybe someone...
Hey guys, here's my code:
/*
Paulino Rosado
10/3/2012
Computer statistics for eight coin tosses
*/
import java.util.*;
Yeah, just a couple of syntax errors, it would be like this:
System.out.println("The sum is "+sum+"/nThe product is "+product+"/nThe average is " +average);
I've never used %d for output, have you tried using +'s? For example:
System.out.println("The info here is "+variable for info+"and "+variable for more info); ect?
Hint: The cannot find symbol error is most usually caused by typos and/or trying to use variables you have not actually initialized!
What?!
Your norm is evolving!
*Amazing norm transformation*
Congratulations! You're Norm has transformed into a Super Moderator!
...
Congratulations.
Also, Norm gave you the correct answer....
*Cough*
Look, the real question here is not who meant to use what, the real question is, how fast can we ignore this and pretend I DIDN'T use circle.
EDIT:
Hey I did the frame version without...
Ah yes, ignore that, I fixed that part, was more focused on why g.fillCircle was not being recognized. I'll edit the post code real quick!
/*
Paulino Rosado
09/24/2012
Draw a bullseye
*/
import javax.swing.JApplet;
import java.awt.*;
public class BullseyeApplet extends JApplet
{
private void drawCircle(Graphics g, int centerX,...
Take a look at this tutorial on switch statements:
The switch Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)
It could do what you ask, and you can use the default...
I'm going to post his code properly formatted, only because I'm not sure if english is his first language, given his hebrew comments and the structure of his OP (No offense meant!)
import...
Unfortunately, I don't know anything about NetBeans, but the code works perfectly, no errors. The only thing is it doesn't display the numbers it computes, but it does asks for the variables and...
I'm using textpad, and just copy/pasting the code it runs perfectly. It asks for variables, it didn't display anything, as helloworld pointed out, but it does ask for the variables. What are you...
Ugh, I'm sorry. I'm trying to get the hang of this not spoon feeding I promise, I tried not to give any actual answers, and just be vague, guess I could have been more vague. I haven't been doing...
This took me longer to figure out than I thought. Here's a question, why do you have interest as an int variable instead of a double? This code right here:
interest = (int)annualInterest / 12; is...
It would make your code look a lot better if you wrapped it with
and [ /code] (with no space.)
Looking over your code, You're calling the math function, yet you don't have it imported, it may...
Newbie has hooked you up, just a small syntax error! I will say this looking through your code though. I have a feeling people are going to be really confused when they guess to high, but the program...
Awesome, glad it worked. Nice catch with the e and f. Good Luck! :D
Well, when you call the Math.java.pow you don't actually need to add the .java in there, that's why it's giving you the cannot find symbol error, afterwards you're going to run into initialization...
Hello!
Please wrap your code using the tags [code=java] and ending the code with [ /code].
Is that the full error message that gets print out? It doesn't tell you which line the null value is on?...
Look into using switch statements, I believe that would allow you to do what yo wish, with switch statements you can have the user input a int (in your case 1 to start 2 to drive 3 to stop) and...
Sorry, I had to do a similar assignment, so just copy/pasted what I had because I wrote in month numbers manually, it wasn't an answer to his assignment, though, since he has to use if/else...
Does your instructor specify that the month integer value has to be a variable, and can't just be entered manually by you? IE:
...
Do as he says!
Here's what's wrong
You're working with decimals, so when you're returning decimals you're returning variable type double, yet I'm seeing int's declared! Change all your...
Please for the love of god dont let it be this, I'll feel too stupid T_T