Question: 4. Write a C program that prompts the user for coordinates of two 3-D points (X1, 91,21) and (x2.Y2,2) and displays the distance between them

 4. Write a C program that prompts the user for coordinates

4. Write a C program that prompts the user for coordinates of two 3-D points (X1, 91,21) and (x2.Y2,2) and displays the distance between them using the following formula. (20 points) Distance = (x1 - x2)2 + (y1 - y2)2 + (21 - 2)2) Note that the coordinate values should be declared as int. The distance calculation should be rounded to 2 decimal places. The mass of a single molecule of water is about 3 x 10-23 grams. A quart of water is about 950 grams. Write a program that requests the amount of water in quarts, and displays the number of water molecules in that amount. (25 points) a. Request the amount of water in quarts. (6 points) b. Convert that amount of water to grams. (5 points) c. Calculate the number of water molecules in that many grams of water. (5 points) d. Display the results in scientific notation. (6 points) Note: The conversion factors should be defined as constant macros. (3 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!