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
Nastasia [14]
3 years ago
10

The hypotenuse function is correct, but the main function has a problem. Explain why it may not work, and show a way to fix it.

Your fix must be to the main function only; you must not change the hypotenuse function in any way.
Mathematics
1 answer:
Drupady [299]3 years ago
7 0

Answer: hello your question is incomplete attached below is the missing codes

Answer : It may not work because; the double pointer P was not allotted a double using a new double ( I.e. Error in the main function ) also the cout statement was not written in the main function

Step-by-step explanation:

It may not work because; the double pointer P was not allotted a double using a new double ( I.e. Error in the main function ) also the cout statement  should be moved to the Main

<u><em>The correction  is below </em></u>

{

   double* p = new double;

   hypotenuse(1.5, 2.0, p);

  cout << "The hypotenuse is " << *p << endl;

}

You might be interested in
Please help me
kirza4 [7]
This is a hexagonal prism: Volume = Area of Base (hexagon) x Height:
There are 6 equal equilateral triangles in a hexagone.
The apothem (or altitude of each triangle) = side x (√3)/2 =12(√3)/2 = 6√3
Area of ONE equilateral triangle = (side x altitude)/2:
Area of ONE equilateral triangle = (12 x 6√3)/2 = 36√3 ft²
Area of the SIX equilateral triangles = 36√3 x 6 = 216√3 ft²
VOLUME = BASE X HEIGHT = 216√3 x 15 = 3240√3 ft³

OR VOLUME = 5612 ft³

6 0
3 years ago
Heelp me im struggling
olga nikolaevna [1]

Answer:

b. -30

Step-by-step explanation:

the reason why it is B is because the operation in front of the number that stands alone without being a constant number that increases (or decreases) like the number 2, it has an x next to it which means that the number 2 is going to increase at a constant rate.

<em>hope it helps:)</em>

6 0
4 years ago
A player of a video game is confronted with a series of four opponents and an 80% probability of defeating each opponent. Assume
mixer [17]

Answer:

(a) 0.4096

(b) 0.64

(c) 0.7942

Step-by-step explanation:

The probability that the player wins is,

P(W)=0.80

Then the probability that the player losses is,

P(L)=1-P(W)=1-0.80=0.20

The player is playing the video game with 4 different opponents.

It is provided that when the player is defeated by an opponent the game ends.

All the possible ways the player can win is: {L, WL, WWL, WWWL and WWWW)

(a)

The results from all the 4 opponents are independent, i.e. the result of a game played with one opponent is unaffected by the result of the game played with another opponent.

The probability that the player defeats all four opponents in a game is,

P (Player defeats all 4 opponents) = P(W)\times P(W)\times P(W)\times P(W)=[P(W)]^{4} =(0.80)^{4}=0.4096

Thus, the probability that the player defeats all four opponents in a game is 0.4096.

(b)

The probability that the player defeats at least two opponents in a game is,

P (Player defeats at least 2) = 1 - P (Player losses the 1st game) - P (Player losses the 2nd game) = 1-P(L)-P(WL)

                                    =1-(0.20)-(0.80\times0.20)\\=1-0.20-0.16\\=0.64

Thus, the probability that the player defeats at least two opponents in a game is 0.64.

(c)

Let <em>X</em> = number of times the player defeats all 4 opponents.

The probability that the player defeats all four opponents in a game is,

P(WWWW) = 0.4096.

Then the random variable X\sim Bin(n=3, p=0.4096)

The probability distribution of binomial is:

P(X=x)={n\choose x}p^{x} (1-p)^{n-x}

The probability that the player defeats all the 4 opponents at least once is,

P (<em>X</em> ≥ 1) = 1 - P (<em>X</em> < 1)

             = 1 - P (<em>X</em> = 0)

             =1-[{3\choose 0}(0.4096)^{0} (1-0.4096)^{3-0}]\\=1-[1\times1\times (0.5904)^{3}\\=1-0.2058\\=0.7942

Thus, the probability that the player defeats all the 4 opponents at least once is 0.7942.

3 0
3 years ago
Factorise fully<br> 4x^2 + 28^3
lawyer [7]

Answer:

4x^2 + 21952

that is your answer

4 0
3 years ago
Factor Trinomials (a&gt;1) Factor completely. 2x^2+7x-4
Dima020 [189]

Step-by-step explanation:

2x^2 + 8x - x -4

2x(x + 4) -1(x+4)

(x+4)(2x-1)

7 0
3 years ago
Other questions:
  • Angles U and V are supplementary angles. The ratio of their measures is 7:13 Find the measure of each angle
    10·1 answer
  • The lengths of pregnancies in a small rural village are normally distributed with a mean of 261 days and a standard deviation of
    11·1 answer
  • I'm havingn trouble in math. What's 3/4 - 2/5 in fraction form?
    15·1 answer
  • 4) →BRAINLIEST &amp; 10+ POINTS! ← A wheel with diameter 44 cm completes four revolutions in 0.5 seconds. Find the linear speed
    15·2 answers
  • Need help with 4-7 and 10-12
    5·1 answer
  • Use Gaussian elimination to write each system in triangular form
    11·1 answer
  • Without doing the math, determine which is greater, 40. 1/4 or 40÷ 1/4. Explain your reasoning.
    8·2 answers
  • How do i check if 12=x-4 is 16
    8·2 answers
  • PLEASE HELP!!!!!!
    7·1 answer
  • Pls just ans the match the following bless yal stay safe
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!