Homework Problems.

Do a logic flowchart or pseudocode for these problems and write the code and get it running.

Problem #1: There are 4 exams for the course you are taking. Enter the 4 grades using 4 prompts. The first exam has a weight of 20%, the second exam has a weight of 25%, the third exam has a weight of 30% and the fourth exam has a weight of 25%. Calulate the average for the exams.

Problem #2: Using a loop take in the four exam grades one per pass through the loop. Each grade has the same weight. Calculate the average and then determine the letter grade. Display both. Then ask the user if they want to enter another set of grades, Y or N and process according to their answer.

Problem #3: Set up a loop where you take in pay information for your employees. You want to let the user control the loop by choosing whether to execute it again. You start out by taking in emp name and salary code. If the salary code is a S you prompt the user to enter the employees salary and calculate their weekly pay. If the code is H you prompt the user for the pay per hour and the hours worked. If the hours worked is greater than 40, you calculate overtime at the rate of time and a half and add to the base pay otherwise they just get the base pay.

Problem #4: You are ready to place an order for some of your products. You take in the inventory id, the inventory code, the amount on hand, the reorder point and the cost and the price. Thee are three criteria sets you are looking for and you need to keep a ct of how many meet each set of criteria and how many meet none of the criteria.
Critera one: inventory code is A and either the cost is over 100 or the price is over 100. Criteria two: inventory code is B and the amount on hand is less than the reorder point Criteria three: inventory code is C and either the profit (price - cost) is greater than 20 or the the reorder point is less than 10. After each inventory record is entered you will add to the counter associated with criteria one, criteria two or criteria three if the criteria was met. If the criteria was not met you will add to another counter. Finally you need to prompt the user about entering another product.

Problem #5: Explain the logic in the code you wrote for Problem #4.

Problem #6: You are gathering points in a game, when you exceed 500 points you display a message telling you to move on to the next level. Using a loop, take in the number of points you earn in a turn and add it to the total. You also want to keep a count of the number of turns. At the end display the points you earned, the number of turns it took and the average number of points per turn.

Problem #7: Explain the logic in the code you wrote for Promblem #6.