Search:

Type: Posts; User: MLIAKIRA

Search: Search took 0.19 seconds.

  1. Replies
    37
    Views
    2,695

    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...
  2. Replies
    37
    Views
    2,695

    Re: If Then Statement Question!

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

    Re: If Then Statement Question!

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

    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....
  5. Replies
    37
    Views
    2,695

    Re: If Then Statement Question!

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

    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.
    ...
  7. Replies
    37
    Views
    2,695

    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!
  8. Replies
    37
    Views
    2,695

    Re: If Then Statement Question!

    package mortgagecalculation2a;

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

    /**
    *
    * @author Akira
    */
    public class MortgageCalculation2a {
  9. Replies
    37
    Views
    2,695

    Re: If Then Statement Question!

    That didn't work.
  10. Replies
    37
    Views
    2,695

    Re: If Then Statement Question!

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

    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...
  12. Replies
    37
    Views
    2,695

    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));
    ...
  13. Replies
    37
    Views
    2,695

    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.
  14. Replies
    37
    Views
    2,695

    Re: If Then Statement Question!

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

    ...
  15. Replies
    37
    Views
    2,695

    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.
  16. Replies
    37
    Views
    2,695

    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...
  17. Replies
    37
    Views
    2,695

    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...
  18. Replies
    37
    Views
    2,695

    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...
  19. Replies
    37
    Views
    2,695

    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...
Results 1 to 19 of 20