Answer:
public static void quad(double a, double b, double c) {
double D = (Math.pow(b, 2)) - (4 * a * c);
if (D<0){
System.out.println("no real solutions");
}
}
Explanation:
The code snippet above implements the function in Java programming language
As required by the question, the line double D = (Math.pow(b, 2)) - (4 * a * c); evaluates b squared" - 4ac and assignes the value to the variable D
An if statement is used to test if D is less than 0, if this is true the message no real solutions is printed
Answer:
the activity or cycle of collaborating with others to trade data and create proficient or social contacts.
Explanation:
<3
Answer:
result=0;
for (i=lo ; i<=hi; i++){
result += i;
}
Explanation:
The question says result was declared but not initialized, so using result without initializing it to 0 would throw an error as result would be undefined and you can't add a number to undefined
Another way to do it to keep everything inside the loop would be
for (i=lo ; i<=hi; i++){
if (i==lo) result= 0;
result += i;
}
but this is impractical since it would add unnecesary operations in each cycle of the loop