CIS 115 Week 8 Final Exam

CIS 115 Week 8 Final Exam

Author: Christine Farr


1. In the following pseudocode, what raise will an employee in Department 8 receive?
If department < 5="" then="">
Set raise = 100
If department < 9="" then="">
Set raise = 200
Set raise = 375
1. In the following code, how many times will the loop body be executed?
int x = 1;
while (x <= 7)="">
3. A zero-based array named testGrades has been declared and loaded with the values 85, 90, 72, 91, 98, 81, and 79. What value(s) will be stored in the array element testGrades[3]?
4. Write a program that computes the amount of money a club will receive from proceeds of its candy bar sales project. The user inputs the number of cases sold and the sale price per bar. Each case contains 20 bars, and each case is purchased at $5 per case from a local vendor. The club is required to give the student government association 10% of its sales. Display the total sales, cost of bars, amount to the student government, and club proceeds
1. A retail store is having a customer appreciation sale. The customer receives a discount on his or her total purchases based on the total dollars purchased. You are to develop pseudocode that will input the total dollars purchased from the user, determine the discount percentage, and then calculate and display the amount of the discount and the total amount due. When the purchases are more than $1000, the discount is 10%. When the purchases are $1000 or less, the discount is 5%.
Create a function called calcDiscount that will calculate and return the discount amount. Write the function and call it in the code

See More
Introduction to Psychology

Analyze this:
Our Intro to Psych Course is only $329.

Sophia college courses cost up to 80% less than traditional courses*. Start a free trial now.