Results 1 to 3 of 3
Thread: I must be seriously messed up...
- 11-16-2008, 12:45 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 19
- Rep Power
- 0
I must be seriously messed up...
ok, I tried doing this program again...seems to have everything it needs, but its still not working..help? I appreciate it so much..I know people must be getting annoyed with seeing this
Java Code:import java.util.*; public class Quadratic { public static void main(String[] args) { Scanner console = new Scanner(System.in); double a = 1, b = 1, c = 1; } public void numA(double a) { this.a = a; } public void numB(double b) { this.b = b; } public void numC(double c) { this.c = c; } public double[] getResult() { double[] result = new double[2]; this.numA(readDouble("a")); System.out.println("Enter the value of a"); scanner.nextDouble(); this.numB(readDouble("b")); System.out.println("Enter the value of b"); scanner.nextDouble(); this.numC(readDouble("c")); System.out.println("Enter the value of c"); scanner.nextDouble(); result[0] = (-b+Math.sqrt((b*b)-4*a*c))/2*a); result[1] = (-b-Math.sqrt((b*b)-4*a*c))/2*a); return result; } }
- 11-16-2008, 01:22 PM #2
Continued from:
I will pay
db
- 11-16-2008, 07:20 PM #3
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
Similar Threads
-
Non functional radio buttons and messed up array
By flameofSuzaku in forum New To JavaReplies: 2Last Post: 01-10-2011, 05:38 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks