Results 1 to 2 of 2
 03042015, 03:15 AM #1Member
 Join Date
 Mar 2015
 Posts
 1
 Rep Power
 0
How do a write a program using the quadratic formula in JGrasp?
Write a program named QuadraticTable.java 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 nonnegative, 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
 03042015, 03:56 AM #2Senior Member
 Join Date
 Jan 2013
 Location
 Northern Virginia, United States
 Posts
 6,226
 Rep Power
 14
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.
Regards,
JimThe Java^{TM} Tutorials  SSCCE  Java Naming Conventions
Poor planning on your part does not constitute an emergency on my part
Similar Threads

quadratic Formula Problem...
By superrm11 in forum Advanced JavaReplies: 18Last Post: 12072014, 03:46 PM 
How to you write a java program using the distance formula?
By fscj in forum New To JavaReplies: 6Last Post: 09272013, 09:33 AM 
How to you write a java program using the distance formula?
By fscj in forum Math ExamplesReplies: 6Last Post: 09272013, 09:33 AM 
Write a java program to display a gui of quadratic equation
By bestlita in forum New To JavaReplies: 4Last Post: 07082011, 06:35 AM 
program for a quadratic formula
By bbtgirl in forum New To JavaReplies: 9Last Post: 01302009, 06:06 PM
Bookmarks