| | |
I really need help,please
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2009
Posts: 4
Reputation:
Solved Threads: 0
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);
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);
•
•
Join Date: Nov 2009
Posts: 4
Reputation:
Solved Threads: 0
0
#3 29 Days Ago
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.
this it the question ,,
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.
this it the question ,,
•
•
Join Date: Nov 2009
Posts: 4
Reputation:
Solved Threads: 0
0
#7 29 Days Ago
ok I correct it ,,
but just one more question ,,
in the statment :
how can I say before this statment ?
sum=console.nextdouble ?!
or what ?!
sorry but I'm not a perfect in java
but just one more question ,,
in the statment :
Java Syntax (Toggle Plain Text)
System.out.println("the value="+sum);
how can I say before this statment ?
sum=console.nextdouble ?!
or what ?!
sorry but I'm not a perfect in java
![]() |
Other Threads in the Java Forum
- Previous Thread: Incompatible types found (HELP!)
- Next Thread: How to implement a sample saas application
| Thread Tools | Search this Thread |
-xlint add android api applet application array arrays automation bi binary blackberry bluetooth chat class classes client code compile compiler component converter database digit eclipse equation error event exception fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image input int integer j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux list login loop main map method methods mobile myregfun netbeans newbie nonstatic notdisplaying page pearl print problem program programming project qt recursion scanner screen scrollbar server set size sms sort spamblocker sql string superclass swing system thread threads time tree variablebinding windows xor






