1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svet_ta [14]
4 years ago
10

Write pseudocode for an algorithm for finding real roots of equation ax2 + bx + c = 0 for arbitrary real coefficients a, b, and

Mathematics
1 answer:
BaLLatris [955]4 years ago
3 0

To find the roots of a quadratic equation ax^2+bx+c=0 you need to use the quadratic formula

x_{1,2} = \dfrac{-b\pm\sqrt{b^2-4ac}}{2a}

This implies that if b^2-4ac the equation has no solutions, if b^2-4ac=0 the equation has one double solution, and two distinct solutions otherwise.

So, the pseudocode could be something like this:

double delta = b*b - 4*a*c;

if (delta < 0) print ("There are no real solutions!");

else if(delta = 0) {

double x = -b/(2*a);

print("There is a double solution: " + x);

} else {

double det = sqrt(delta);

double x1 = (-b+det)/(2*a);

double x1 = (-b-det)/(2*a);

print ("The two solutions are " + x1 + "and" + x2);

}

You might be interested in
after being discounted 40%, weather radio sells for $35.97. find the original price (round your answer to the nearest cent)
Wittaler [7]

Answer:

$89.93

Step-by-step explanation:

Set up an equation:

Variable x = original price

40/100 = 35.97/x

Cross multiply

40 × x = 100 × 35.97

40x = 3597

Divide both sides by 40

x = 89.925

Round to the nearest cent:

5 rounds up so:

89.93

Check your work (use the original number instead of the rounded number to be more exact):

89.925 × 40%

Convert the percentage into a decimal to multiply:

89.925 × 0.40

35.97

Correct!

4 0
3 years ago
Read 2 more answers
A. When x = -1, what is the value of y?
pogonyaev

Answer:

i think we need more context to this answer.  I’d love to help no need to retype. You can just message me for help :)

Step-by-step explanation:

7 0
3 years ago
Help me for both parts (a) and (b). For (b) it's just to check my answer.
Klio2033 [76]
Hello,

a) k=8+6=14 cm
b)
AC=√(8²+6²)=10
or AC=√(8²-6²)=√28=2√7=5,29150...


8 0
3 years ago
Points are: A= (-2,7)B= (3,5)C= (1,0) To show that the triangle is a right triangle, show that the sum of the squares of the len
Gala2k [10]

The sum of the squares of the lengths is 58

The square of length of the hypotenuse is 58

From the question, we have

AB² = (-2-3)² +(7-5)²= 25+4 =29

BC² = (3-1)²+(5-0)²=4+25=29

AC² = (-2-1)²+(7-0)² = 9+49 = 58

Here we can see that,

AB²+BC² = AC²

The sum of the squares of the lengths of two sides (the legs) equals the square length of the third side (hypotenuse).

the sum of the squares of the lengths = AB²+BC² =29+29 = 58

the square of length of the hypotenuse= 58

Pythagoras Theorem:

In a right-angled triangle, the square of the hypotenuse side is equal to the sum of the squares of the other two sides, according to Pythagoras's Theorem. These triangle's three sides are known as the Perpendicular, Base, and Hypotenuse. Due to its position opposite the 90° angle, the hypotenuse in this case is the longest side. When the positive integer sides of a right triangle (let's say sides a, b, and c) are squared, the result is an equation known as a Pythagorean triple.

To learn more about pythagoras theorem visit: brainly.com/question/343682

#SPJ9

5 0
1 year ago
Two new student clubs start at a school. Each club has a plan to increase membership.
Triss [41]

Answer:

The correct option is;

N = 4·w + 12

N = 3 (2)^w

Step-by-step explanation:

The given plan the clubs will use to increase membership are;

Club 1: The starting number of members in the club = 12

The number of additional members added each week = 4

Club 2: The starting number of members in the club = 3

The total number of members at the end of each week = Double the the initial total membership

Therefore, we have;

For club 1, N = 12 + 4×w = 4·w + 12

N = 4·w + 12

For club 2, at week w, N = 3 × 2 × 2 ×...× 2 = 3 \times 2^w

The correct option is therefore, N = 4·w + 12, N = 3 (2)^w

5 0
3 years ago
Other questions:
  • How to Increase 8 by 9.4%
    13·1 answer
  • Which statement describes a process to solve b+20 - b=5
    15·2 answers
  • If 3p+34=90, 2r+44=76 and 53+6s=1421, what is the product of p, r, and s?
    11·1 answer
  • Which input value produces the same output value for the two functions on the graph?x = x= –3
    7·2 answers
  • The circumference of the circle shown below is 42 centimeters. Which
    9·2 answers
  • Dylan's Dog Weighs 12 times as much as his pet rabbit. The Dog and Rabbit weigh 104 pounds altogether. How much does Dylan's Dog
    10·1 answer
  • How to get GIRL FRIEND ONLINE?<br><br>LOL FREE PTS ​
    6·1 answer
  • Helppppppppppppppppppppppppppppppppp
    12·1 answer
  • Resuelve la siguiente suma de fracciones: 2/6 + 1/2 + 1/3=
    10·1 answer
  • A company makes electronic components for TV's. 0% pass final inspection. 110 components are inspected in one day. What is the e
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!