Search:

Type: Posts; User: helloworld922

Search: Search took 0.19 seconds.

  1. Replies
    13
    Views
    4,525

    Re: Calculate federal taxes program! Help!

    Yeah, I guess that looks like what you want. Newline characters are what put lines of text on different lines. Ex:


    System.out.println("This has no new lines. These two sentences are on the same...
  2. Replies
    13
    Views
    4,525

    Re: Calculate federal taxes program! Help!

    oops, my bad. I forgot to shuffle the sumOfTax calculation around. that line should go underneath the if/else statements (after you've calculated the new tax dollar cost).

    You still have the "%%"...
  3. Replies
    13
    Views
    4,525

    Re: Calculate federal taxes program! Help!

    To display out a dollar sign, simply tell it to print out the dollar sign.


    System.out.println("This is a dollar amount: $%0.2f",1.23); // will print out $1.23

    Again, you're printing out...
  4. Replies
    13
    Views
    4,525

    Re: Calculate federal taxes program! Help!

    What your program is doing is waiting for you to enter an initial double. What you should be doing is displaying the text for entering the income before asking for the income.
    ...
  5. Replies
    13
    Views
    4,525

    Re: Calculate federal taxes program! Help!

    You need to initialize all variables before you can use them. This is different from some programming languages which initialize their variables to a "default" value. They don't necessarily need to...
Results 1 to 5 of 5