Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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 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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started