Question
Part 1: 1. Write a C program that helps you to complete Self-Check Questions 1 in Section 3.2 on Page 123. Hints: a. You need
Part 1: 1. Write a C program that helps you to complete Self-Check Questions 1 in Section 3.2 on Page 123. Hints: a. You need to declare a variable for x, y, z, u, v, w, assign them some initial values, and declare a variable to hold the result of the expressions, add one printf statement to print the value of the result. b. Make sure that you include the declarations of C library functions.
2. Write a C program to complete Programming Exercise Question 3 in Section 3.4 on Page 136. Hints: You need to write a function named print_instruction(), place its prototype before main() and its definition after main(). Then inside main(), call this function after variable declaration. NOTE: The questions in Part 1 are NOT required to submit.
Part 2: 1. Complete the MODIFIED programming project 1 in Page 167. Implementation requirements: a. You MUST write a function that calculates the monthly payment based on the principal, monthly interest rate, and total number of payments.
b. You must get the principal, monthly interest rate, and total number of payments from user inside main(), then pass these values to this function in a. above, then print the computed monthly payment inside main().
c. You dont get user input inside this function in a. above. Hints: The function in a. above is a function with multiple input arguments and one return result. It is like the function scale() in Figure 3.23 on Page 142. Your main() function is like the main() in Figure 3.24 on Page 143. Your entire program is like the entire program in Figure 3.24 on Page 143.
THE QUESTIONS ARE FROM THE PROBLEM SOLVING AND PROGRAM DESIGN IN C
3 runctions with Input Arguments 143 FIGURE 3.24 Testing Function scale 2Tests function scale. /* printf, scanf definitions / /* pow definition */
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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