subject

Enter the following code to calculate the distance between two points on the x, y plane. The program asks a user to enter 2 points, 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", ?);

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
You know the right answer?
Enter the following code to calculate the distance between two points on the x, y plane. The program...
Questions
question
History, 16.09.2019 04:10
question
English, 16.09.2019 04:10
question
Mathematics, 16.09.2019 04:10
question
Mathematics, 16.09.2019 04:10
question
Mathematics, 16.09.2019 04:10
Questions on the website: 13722363