Question: 1. Write a program that produces the following output: (20 points) Smile! Smile! Smile! Smile! Smile! Smile! The program should define a function that displays

1. Write a program that produces the following output: (20 points) Smile! Smile! Smile! Smile! Smile! Smile! The program should define a function that displays Smile! once, and use the function as often as needed. In this problem, you would be calling the function that prints Smile! within the function 010). 2. Write a program that sounds a beep, and then prints the following text: (10 points) So excited that she shouted, "What a wonderful day full of sweets, flowers, and love! Wishing you all the best this Valentine's Day." 3. Write a program that calls a function named one three (). This function should display the word one on one line, call the function two (), and then display the word three on one line. The function two() should display the word two on one line. The Q3() function should display the phrase starting now: before calling one_three () and display done! after calling it. Thus, the output should look like the following: (25 points) starting now: one two three done! 4. Write a C program that prompts the user for coordinates of two 3-D points (X1, 91, 2) and (X2.Y2,22) and displays the distance between them using the following formula. (20 points) Distance = (x - x)2 + (y1 - y)2 + (21 - 2)) Note that the coordinate values should be declared as int. The distance calculation should be rounded to 2 decimal places. 5. 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
Get step-by-step solutions from verified subject matter experts
