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
nikdorinn [45]
4 years ago
7

Enter the following code to calculate the distance between two points on the x, y plane. The program asks a user to enter 2 poin

ts, then calculates the distance between the 2 points and prints out the distance on the screen. You need to replace any "?" with the appropriate code. #include #include - Since you are using the math library, you'll need to include the -Im option when compiling, for example: gec extra4.c-Im-o extra4 struct point float x; float y: }; float distance (struct point, struct point); void enter_a_point ( struct point *); int main (void) struct point pti, pt2; enter_a_point(?); //get x 6 y values for pti enter_a_point(?): //get x & y values for pt2 printf( "Distance between the points=4.2f\n", distance(?, ?) ); return 0; Distance Formula float distance (struct point p1, struct point p2) 4 = (x - x) + (y - y) return sart pow( ?, 2) - powl ?, 2)); < void enter_a_point ( struct point p) printf("\nEnter an X coordinate: "); scanf("f", ?); printf("\nEnter a y coordinate: "); scanf("%f", ?);
Computers and Technology
1 answer:
nikklg [1K]4 years ago
5 0

Answer:

Explanation:

Ok, I don't understand anything at the end because it's utter gibberish.

What you can do, based on the question, is ask user input for the two x and two y coordinates, then use the distance formula. The distance is \sqrt{(x_1-x_2)^2+(y_1-y_2)^2} . Find a way to insert that using the math library.

Hope that helped,

-FruDe

You might be interested in
Tom teaches in a high school. He wishes to sort a spreadsheet containing students' marks in various subjects by descending order
cricket20 [7]

Answer:

Select the data to sort

Explanation:

4 0
3 years ago
Write the interface (.h file) of a class Counter containing: A data member counter of type int. A data member named counterID of
OlgaM077 [116]

Explanation:

See the attached image for The interface (.h file) of a class Counter

8 0
4 years ago
Which of the following is not a benefit of normalization?
mixer [17]

Answer:

The answer is option (4) Maximize redundancy as normalization minimizes redundancy of data.

Explanation:

Normalization of databases leads to minimization of data redundancy in databases. It doesn't maximize data redundancy. Data redundancy leads to wastage of resources. Normalization of databases minimizes insertion anomolies. Normalization of databases minimizes deletion anomolies. Normalization of databases minimizes updation anomolies.  So , the answer to the question is option (4) maximize redundancy.

8 0
3 years ago
You are the owner of a movie theater upgrading to digital film, and are concerned about the cost of buying new digital equipment
Triss [41]

I would do A, as it would be better to use it and would make a good profit handling the assets

5 0
3 years ago
What is true about an electric field around a negative charge?
FrozenT [24]

The electric field points outward

8 0
3 years ago
Read 2 more answers
Other questions:
  • Users can make notes or highlight areas of a website and then use the ________ feature of Microsoft Edge to send the highlighted
    13·1 answer
  • Name that red flag asigment
    15·2 answers
  • The 3 parts of the CPU are
    15·2 answers
  • Which is a correctly formatted Python tuple?
    9·1 answer
  • What is a slide master ?
    8·2 answers
  • The CSS property of top , bottom , left , or right moves the element the specified distance from the respective edge of the clos
    7·1 answer
  • Sum of 18/7 and 13/7 is *​
    14·2 answers
  • You scan the network and find a counterfeit access point that is using the same SSID as an already existing access point. What i
    12·1 answer
  • Which of the following online creation tools will be used if a person wants to create a video presentation?
    8·1 answer
  • Can anyone figure this out???? I need help ASAP!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!