Results 1 to 2 of 2
  1. #1
    whitetiger is offline Member
    Join Date
    Mar 2015
    Rep Power

    Question How do a write a program using the quadratic formula in JGrasp?

    Write a program named that takes three double arguments and two int
    arguments (in that order) from the command line. The three doubles will represent a, b, and c
    from the quadratic formula.
    If the discriminant is non-negative, find and print the solutions to the quadratic equation. (The
    plus/minus sign in the quadratic formula indicates that you would separately perform both
    operations). Otherwise print “no real solutions”
    Then using the last two int arguments as x_min and x_max, print a table of x and 𝑎𝑥
    2 + 𝑏𝑥 + 𝑐
    values using the a, b, and c read in as command line arguments.
    Sample output: (command line arguments were 1 0 2 -3 3)
    1x^2 + 0x + 2 has no real solutions.
    X 1x^2 + 0x + 2
    -3 11
    -2 6
    -1 2
    0 2
    1 3
    2 6
    3 11

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Northern Virginia, United States
    Rep Power

    Default Re: How do a write a program using the quadratic formula in JGrasp?

    First, you are not writing the program in JGrasp. You are writing the program in Java. JGrasp is an IDE and has no bearing on the actual code. Now, just post your code and explain where you are having problems. Then we can help you.

    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. quadratic Formula Problem...
    By superrm11 in forum Advanced Java
    Replies: 18
    Last Post: 12-07-2014, 03:46 PM
  2. Replies: 6
    Last Post: 09-27-2013, 09:33 AM
  3. Replies: 6
    Last Post: 09-27-2013, 09:33 AM
  4. Replies: 4
    Last Post: 07-08-2011, 06:35 AM
  5. program for a quadratic formula
    By bbtgirl in forum New To Java
    Replies: 9
    Last Post: 01-30-2009, 06:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts