Search:

Type: Posts; User: JavaAsh

Search: Search took 0.07 seconds.

  1. Re: Can someone please tell me why my do while loop isn't working?

    Weird. No idea why mine won't work then. Thank you for your help.
  2. Re: Can someone please tell me why my do while loop isn't working?

    It compiles now, but the output is 0.0. I'm pretty sure that's because I have the equation before it actually receives the input. But if I put the equation after the input it gives me that same error...
  3. Re: Can someone please tell me why my do while loop isn't working?

    It is declared before the while. I moved it up to declare it before the 'do' and and it runs, but then gets an error, incorrect output of "0.0", and then it closes before it gives the option of...
  4. Re: Can someone please tell me why my do while loop isn't working?

    I added them to presentValue. Now it won't compile still, but I have just one error:


    Project2.java:59: error: cannot find symbol
    return present;
    ^
    symbol: variable present
    ...
  5. Re: Can someone please tell me why my do while loop isn't working?

    Sorry, I'll make sure to include that next time. They are declared in the main where the other variables are declared. The other inputs work just fine. Again, if the while loop is taken out then the...
  6. Re: Can someone please tell me why my do while loop isn't working?

    Yes I noticed that. I fixed that and still no fix.
  7. Re: Can someone please tell me why my do while loop isn't working?

    Yes I know it won't compile. It did fine before I tried adding the loop. Here are the errors:


    Project2.java:50: error: cannot find symbol
    input = keyboard.nextLine();
    ^
    symbol: ...
  8. Can someone please tell me why my do while loop isn't working?

    Hi, everyone, can someone please take a look at my code and let me know why my do while loop does not work? The program runs properly until I add the do while loop. I referenced my book and have no...
  9. Replies
    7
    Views
    2,451

    Re: Problem with Java code for Project

    I think I got it! I moved the output statement from the main function back to the displayValue function and I get a real number instead of 0.0!

    Ashley
  10. Replies
    7
    Views
    2,451

    Re: Problem with Java code for Project

    Thank you, Penguin! I'll keep working at it then.

    Ashley
  11. Replies
    7
    Views
    2,451

    Re: Problem with Java code for Project

    Hey, Cody! Thanks a lot for your help. It's good to know that I'm only making simple mistakes thus far. I get so frustrated sometimes that I want to give up. I've been working on this for the last...
  12. Replies
    7
    Views
    2,451

    Problem with Java code for Project

    Hi everyone, I'm new here and new to Java (I guess this is how all newbies start their threads :P)

    Anyway, I have to make a program that will calculate present value. We have to do the...
Results 1 to 12 of 12