Question: 3) (40 pts) Write CH programs for each of the following For each program Use the TCC template (see next page). Complete the items listed
3) (40 pts) Write CH programs for each of the following For each program Use the TCC template (see next page). Complete the items listed in the template. Include plenty of comments The output should be neatly and clearly formatted. Use good programming style and proper indentation. Turn in a printout of the program and printouts for all required test cases, A) Write a program for Programming Exercise 2.20 (slope of a lind) on p. 69 in the textbook. Testing: Run the program for the three cases shown below (the first case is the example provided with the problem in the text). Display the result in the format indicated in the textbook problem Case x1 yi x2 y2 1 45 -5.5 -6.5 2 -1.5 2.5 4.5 -7.5 3 Pick any example with (x1 y1) in the 2nd quadrant and (x22) in the 4th quadrant 6.6 B) Write a program for Programming Exercise 2.7 (convert minutes to years and days) on p. 66 in the textbook Testing Run the program for the three cases shown below (the first case is the example provided with the problem in the text) Display the result in the format indicated in the textbook problem Case Number of Minutes 1000000000 2 Any 4 digit number 3 Any 6 digit number 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
