subject

Write a function to calculate the distance between two points Distance( x1, y1,x2.2) For example Distance(0.0,3.0, 4.0.0.0) should return 5.0 Use the function in main to loop through reading in pairs of points until the all zeros are entered printing distance with two decimal precision for each pair of points. For example with input
32 32 54 12
52 56 8 30
44 94 4439 6
5 19 51 91 7.5
89 34 0000
Your output would be:.
a. 29.73
b. 51.11
c. 55.00
d. 73.35
e. 92.66

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
It is not a good idea in a cover letter to mention another person whom the employer knows.
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of ā€œtagā€ to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 11:30
What does the https: // mean when you type in a website
Answers: 1
You know the right answer?
Write a function to calculate the distance between two points Distance( x1, y1,x2.2) For example Dis...
Questions
question
Mathematics, 08.02.2021 19:30
question
Health, 08.02.2021 19:30
question
Mathematics, 08.02.2021 19:30
Questions on the website: 13722362