Search:

Type: Posts; User: JT123

Search: Search took 0.09 seconds.

  1. Replies
    11
    Views
    1,051

    Re: Help with programming homework

    The area is correct, I transferred the formula straight from the handout for my homework. I dont need it to print the area, if its not a triangle, I cant have an area of the inputs. I just need it to...
  2. Replies
    11
    Views
    1,051

    Re: Help with programming homework

    This is what the console window says:
    Welcome to the Triangle Calculation Program!
    Enter length of side one => 2
    Enter length of side two => 5
    Enter length of side three => 9
    Your Triangle has...
  3. Replies
    11
    Views
    1,051

    Re: Help with programming homework

    Nevermind, I fixed it. It works now but another problem has come up.

    if ( ( s * s-a * s-b * s-c < 0 ) ) {
    System.out.println("Sorry- not a valid triangle");
    }
    It works, but I do not get the...
  4. Replies
    11
    Views
    1,051

    Re: Help with programming homework

    It states that variable s in the formula might not have been initialized. But I thought I did that?

    --- Update ---

    Nevermind, I fixed it. It works now but another problem has come up.

    if (...
  5. Replies
    11
    Views
    1,051

    Re: Help with programming homework

    Where the "?" is, I need to input a formula to where earlier in the program, if I enter 3 sides that cant possibly make a triangle, the 3 inputs will be put in that formula and it will print "Sorry-...
  6. Replies
    11
    Views
    1,051

    Help with programming homework

    I have this program that I need help with. Basically its a program where a user is prompted to enter the length of all three sides of a triangle and the program calculates the area by herons formula...
Results 1 to 6 of 6