
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Design an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format: test score 30, 25, 20, 25 weightTestScore 35% , 25% , 15% , 25% โ Step1. Read the score of each test โ Step2. Read the weight of each test โ Step3. Multiply each test score by its respective weight (testscore1 * weight1). โ Step4. Get the of the results you got in step 3 ((testscore1 * weight1) +(testscore2 * weight2) etc) โ Step5. Divide the sum you calculated in step three by 4 ( the number of tests) Suppose that x, y, z, and w are int variables. What is stored in x, y, z, and w after the following statements execute? x = 9; y = x - 4; z = (y + 7) % 6; w = (x * z) / y - 3; z = w + (x - y + 2) % x; โ x= โ y= โ z= โ w=