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
m_a_m_a [10]
3 years ago
13

3. Write a program that asks the user to type the coordinate

Computers and Technology
1 answer:
Serhud [2]3 years ago
4 0

<u>Answer: </u>

<em>#include <stdio.h> </em>

<em>#include <math.h> </em>

<em>int main() </em>

<em>{ </em>

<em>float x1, y1, x2, y2, gdistance; </em>

<em>printf("Input x1: "); </em>

<em>scanf("%f", &x1); </em>

<em>printf("Input y1: "); </em>

<em>scanf("%f", &y1); </em>

<em>printf("Input x2: "); </em>

<em>scanf("%f", &x2); </em>

<em>printf("Input y2: "); </em>

<em>scanf("%f", &y2); </em>

<em>gdistance = ((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)); </em>

<em>printf("Distance between the said points: %.4f", sqrt(gdistance)); </em>

<em>printf("\n"); </em>

<em>return 0; </em>

<em>} </em>

<em>Here we need two coordinates so we need 4 variables namely x1, y1, x2, y2</em> to obtain the input from the user and to calculate distance we need another variable. <em>So finally the result should be printed.</em>

You might be interested in
You have been studying processors. Your instructor has asked you to help prepare a lecture for introductory students learning ab
Svetlanka [38]

Answer:

Executing is the correct answer of the following question.

Explanation:

The ALU conducts data calculations, and is part of the system cycle execution process.Information and software engineering is the mechanism by which a software or digital machine conducts a computer program's instructions.The system instructions trigger patterns of basic acts at the performing computer.

Computer programs may be enacted in a cluster phase lacking direct human or a recipient-type instructions in an interpreter's collaborative process.

5 0
3 years ago
A company has an Aruba solution. The company wants to host a guest login portal with this solution, and the login portal must gi
mariarad [96]

Answer: D. Choose ClearPass or the other external captive portal option for the guest WLAN.

Explanation:

The Aruba Instant On mobile app allows the configuration and monitoring of a network from anywhere. It provides an affordable solution to small businesses and they're reliable and secure.

Based on the criteria given in the question, the network administrator can meet the criteria by choosing a ClearPass or the other external captive portal option for the guest WLAN.

8 0
3 years ago
True or false word inserts text to the right Of the insertion point
uysha [10]
False.................................
3 0
3 years ago
List three network threats and list the it infrastructure domain that the threat may harm. why/how does those threats harm that
ValentinkaMS [17]

Malware,

Advanced persistent threats,

Distributed denial-of-service attacks.

<h3>What are the threats of networks?</h3>
  • There are different kinds of network threats, and each has different goals. Some, like distributed denial-of-service (DDoS) attacks, seek to shut down your network or servers by overwhelming them with requests.
  • Other threats, like malware or credential theft, are aimed at stealing your data.

To learn more about it, refer

to brainly.com/question/23275071

#SPJ4

6 0
2 years ago
Which of the following hardware devices could you install without having to hire an experienced professional? Check all of the b
Alona [7]

MP3 Player

Explanation:

because it is easy to set up with some instructions to follow if you bought them

5 0
4 years ago
Read 2 more answers
Other questions:
  • 6. When should you return to the right lane after passing another car on the left?
    14·2 answers
  • When setting quotas for disk space, what are the two tools for enabling and configuring quotas? and which of the two are the mor
    8·1 answer
  • You have a large company, and it is important to your business that your employees' work is backed up regularly. Which network w
    5·1 answer
  • Pls help brainliest
    12·1 answer
  • People are able to predict future events to some extent because: (Select all that apply)
    11·1 answer
  • If you go over 255 in RGB by 1 does it reset to 0 or 1
    11·1 answer
  • When would it be beneficial to make a copy of a document
    10·1 answer
  • How are gems and precious metals similar?
    6·2 answers
  • In this exercise, first run the code as it is given to see the intended output. Then trace through each of the 3 variables to se
    8·1 answer
  • Please tell fast plzzzzzz. ​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!