Search:

Type: Posts; User: MLIAKIRA

Page 1 of 2 1 2

Search: Search took 0.08 seconds.

  1. Replies
    2
    Views
    990

    What's wrong with my code!? seriously...

    Okay so basically I'm making a mortgage program and I'm supposed to ask the user if they would want to run the calculation again. It works for the most part, when i type in positive inputs, but when...
  2. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    I guess netbeans is broken then...I created a new file, renamed it, did everything I think I could and it's still not doing what you said you got...

    --- Update ---

    SMH. I guess the file was...
  3. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    So this code works perfectly for you and it just seems to not want to work on netbeans?
  4. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    it says javac is unrecognizable...should I just give up?
  5. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    Nope can you show me how?

    EDIT: but that doesn't help me with the code will it? also, I have to turn it in working on netbeans sooo....
  6. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    yes.
    If that code is impossible what's the code you used to get that answer?!
  7. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    You just said that code could not create what I wanted and could you maybe screen shot it? Are you sure you didn't change it because this is exactly what I got after saving and reopening netbeans.
    ...
  8. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    I know!! That's why I've been asking for help hahah
    Hence "my goal"

    All the equations and stuff work perfectly it's just the If-Then statements!
  9. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    package mortgagecalculation2a;

    import java.text.NumberFormat;
    import java.util.Scanner;

    /**
    *
    * @author Akira
    */
    public class MortgageCalculation2a {
  10. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    That didn't work.
  11. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    if (loanAmount < 0)
    {
    System.out.println("ALL NUMERICAL VALUES MUST BE POSITIVE!");
    }
    else if (interestRate < 0)
    {
    ...
  12. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    Okay so I tried option 1 and 2 and it still does the calculation at the end. Also, how would I make it so "The monthly payment is: " not even show up, this is what I was trying to do in the...
  13. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    if (loanAmount < 0)
    {

    System.out.println(monthlyPayment = interestRate * loanAmount * (Math.pow(1+interestRate, months))/(Math.pow(1+interestRate, months)-1));
    ...
  14. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    Still confused because you said everything you put in the else if block doesn't execute and if loanAmount and the other variables is less than zero I don't want the equation to be executed.
  15. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    if (loanAmount < 0){
    } else if (monthlyPayment = interestRate * loanAmount * (Math.pow(1+interestRate, months))/(Math.pow(1+interestRate, months)-1)){

    ...
  16. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    Well I tried putting the equation in there...all i got was a red bar so that didnt work and I dont know what else to put so I asked, sorry.
  17. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    So I what would I put in the else block? Should I put the monthlyPayment equation so that the calculation will not execute then just do a system.out.println of the message? Also, would I have to...
  18. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    It basically told me what I already know....
    It does not for a fact tell me how I can make it so the message only shows up once as the output and doesn't still do the calculation. I know it's all...
  19. Replies
    37
    Views
    2,725

    Re: If Then Statement Question!

    I already checked out that website before posting, that is why I posted. I didn't really see the help in it. It doesn't say anywhere how to do the question I asked.

    --- Update ---

    How do I...
  20. Replies
    37
    Views
    2,725

    If Then Statement Question!

    Okay so here is my code. For my project we have to calculate the monthly payment for a mortgage. My professor wants us to set it up so when someone enters a negative number for any of the inputs it...
  21. Replies
    8
    Views
    1,309

    Re: ')' and ';' error

    trust me ive been trying. I use netbeans so maybe its different but i cant find anywhere a compile button.
  22. Replies
    8
    Views
    1,309

    Re: ')' and ';' error

    How do I do that? I hover my mouse over the red bar and it says ')' unexpected

    --- Update ---

    Compiling 1 source file to E:\MortgageCaculation\build\classes...
  23. Replies
    8
    Views
    1,309

    Re: ')' and ';' error

    here is a pic of my code if that helps

    2341
  24. Replies
    8
    Views
    1,309

    Re: ')' and ';' error

    Oh I guess I didn't really state that clearly. We have to calculate a monthly mortgage and my professor gave me this equation we have to use and its

    monthly payment = rate x amount x...
  25. Replies
    8
    Views
    1,309

    ')' and ';' error

    So I need to find the monthly payment for a motgage and I can't seem to find what is wrong with my equation, someone help please!

    monthlyPayment = taxRate * loanAmount * ((Math.pow(1+taxRate,...
Results 1 to 25 of 26
Page 1 of 2 1 2