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
When a web page author includes meta keywords, like sex, that have little to do with the information on the page, the author is
OLga [1]
This practice is known as "ClickBait".
8 0
3 years ago
Which of the following assignment statements contains a LOGICAL error? I multiply two numbers when they need to be added I write
valentinak56 [21]

Answer:

(a) I multiply two numbers when they need to be added

Explanation:

By definition, a Logical Error is a coding mistake resulting in the program NOT producing the expected result or behaviour, however the source code is syntactically correct and the program could <em>compile </em>and <em>execute </em>unaware of the error, or result on a <em>crash </em>during <em>runtime</em>.

6 0
3 years ago
If C2=20 and D2=10 what is the result of the function = mathcal I F(C2=D2,^ prime prime Ful "Open")?
Leya [2.2K]

Excel IF functions are used to test conditions.

The result of the IF function is (a) Open

The function is given as: <em>= IF(C2 = D2, "Full","Open")</em>

Where: C2 = 20 and D2= 10

The syntax of an Excel IF conditional statement is: <em>= IF (Condition, value_if_true, value_if_false)</em>

The condition is: <em>IF C2 = D2</em>

The values of C2 and D2 are: 20 and 10, respectively.

This means that, 20 does not equal 10.

So, the value_if_false will be the result of the condition.

In other words, the result of the IF function is <em>(a) Open</em>

<em />

<em />

Read more about Excel functions at:

brainly.com/question/10307135

7 0
3 years ago
List 4 (four) applications you have used that most likely employed a database system to store persistenet data
ANEK [815]

Four applications that most likely employed a database system to store persistent data are:

  1. Banking
  2. Airlines
  3. Universities
  4. Online news sites

<h3>What is a persistent data?</h3>

A persistent data can be defined as any type of data that comprises an information that is durable, rarely accessed and isn't likely to be modified, even when the parent application is accessed and altered.

In Computer technology, four (4) real-life applications that most likely employed a database system for the storage of persistent data include the following:

  1. Banking
  2. Airlines
  3. Universities
  4. Online news sites

Read more on data here: brainly.com/question/14788007

#SPJ1

6 0
2 years ago
What is the process of adding random characters at the beginning or end of a password to generate a completely different hash ca
weeeeeb [17]

Answer:

Salting

Explanation:

Salting is an idea that is related to hashing of password which is the mapping of input data to a fixed length output data by the use of algorithms.

Salting is the addition of a distinctive value to the beginning or end of a password in order to form a different hash value from the hash value that would have been generated without the 'salt', thereby making the passwords more secure from attacks

The salt for each user is a unique value that is stored along with the username in a database

5 0
3 years ago
Other questions:
  • Once you've connected to a data source, which button would you select to add a first name to your form letter?
    6·2 answers
  • Write a program that read first a user's given name followed by the user's age from standard input. Then use an ofstream object
    8·1 answer
  • Why does a layer 3 device perform the anding process on a destination ip address and subnet mask?
    10·1 answer
  • For each of the following SQL queries, for each relation involved,list the attributes that must be examined to compute the answe
    9·1 answer
  • Which of the threats discussed in this chapter should receive Charlie’s attention early in his planning process?Ethical Decision
    10·1 answer
  • A(n) ________________ must be completed immediately following an incident as it is an essential document that details an inciden
    14·1 answer
  • Variable-length entities. fixed-length entities. data structures that contain up to 10 related data items. used to draw a sequen
    14·1 answer
  • Please
    14·1 answer
  • Read the steps in the process of making a video.
    5·2 answers
  • How does our behavior change when we know we're being watched?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!