heey all ,,
I'v a question about the pow ,, but when I run the programe it didn't work =S
I really need help because tomorrow I shloud give it to my teacher,,
********************************************
import java.lang.Math;
public class ques3
{
public static void main(String[]args)
{
static Scanner console = new Scanner(System.in);
float a,b,c;
System.out.println("Enter a ");
a=console.nextFloat();
System.out.println("Enter b ");
b=console.nextFloat();
System.out.println("Enter c ");
c=console.nextFloat();
sum=Math.Pow((double)b*b-4*a*c,0.5);
3. Write expressions to compute both solutions for the quadratic formula. The formula is (b^2-4ac)^0.5
The symbol means “plus or minus” and indicates that the equation has two solutions: one in which the result of the square root is added to -b and one in which the result is subtracted from -b. Assume all variables are float variables.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.