0
Debug please
2 ответов
+ 3
Fatemeh Sivandi
1 - This method declaration is wrong
public static void main SolveEq2 (double a, double b, double c) {
Here should be
public static void solveEq2 (double a, double b, double c) {
2 - Here you missed one ) or remove ( from starting.
double x1 = (-b + Math.sqrt(b*b - 4*a*c)/(2*a);
double x2 = (-b - Math.sqrt(b*b - 4*a*c)/(2*a);
3 - You can't print value with comma separated in println method because println accept only one parameter
System.out.println("where a = %f, b = %f, c = %f",a , b, c);
use format instead of println
https://code.sololearn.com/cgXTJ40eh3Un/?ref=app
4 - use .2f to get output upto 2 decimal
+ 1
Thankkkkk u