Professional Documents
Culture Documents
PART I.
2. Construct an algorithm that will compute for the midterm grade of a student. The
midterm grade is equal to one-third of the minor A exam and two-thirds of the midterm
exam. Print the midterm grade.
3. Construct an algorithm that will input values for A and B. Compare the two values
inputted and print which of the values is higher including the remark “Higher”.
4. Write an algorithm that will input a grade of student and determine whether the grade
is passed or failed. The passing grade is 75. Print the name, grade and remarks of student.
5. Write an algorithm that will display if the inputted age is qualified to vote or not. The
qualifying age is 18 and above.
6.Write an algorithm to read in name and age of student. Display the inputted values.
F = (9/5)C + 32
Write the algorithm that will read in a Celsius temperature and then output the
equivalent Fahrenheit temperature.
8. The straight-line method for computing the yearly depreciation in value D for an item
is given by the formula
D=P–S
Y
where P is the purchase price, S is the salvage value, and Y is the number of years the
item is used. Write an algorithm that takes as input the purchase price of an item, its
expected number of years of service, and its expected salvage value, and then outputs the
yearly depreciation for the item.
PART II.
1. Draw a flowchart and display the output using FLOWGORITHM apps that
determines if the employee has to be paid of overtime pay (OT). They will be paid
an OT if they exceed 40 hours work in a week, regular pay (RP) if less than or equal
to 40 hours only. Display “OT Pay” or “RP Pay”, based on this condition.
2. Draw a flowchart that determines if the input number is even or odd. Display error
message if an entry is not a number.
3. The initial value of the radius of a circle is equal to one unit and each succeeding
radius is one unit greater than the value before it. Give the algorithm and draw a
flowchart to compute the area of the circle starting with R = 1.0 up to R = 5.0, then
print out each radius and the corresponding area of the circle. Use the formula
Area =∏ r 2 to get the area of the circle. PI has a value of 3.1416.
4. The AXIES Manufacturing Company plans to give a year-end bonus to each of its
employees. Give the algorithm then draw the flowchart which will compute the
bonus of an employee. Consider the following criteria: If the employee’s monthly
salary is less than 1,000.00 pesos, the bonus is 50% of the salary; for employees
with salaries greater than or equal to 1,000.00 pesos, the bonus is 1,000.00. Print
out the name and corresponding bonus of the employee.
5. Draw a flowchart that will display the corresponding remark of a given input
grade. The range of grades and its corresponding remark are given below:
8. Write the algorithm and draw a flowchart that will calculate the sum of the given
sequence numbers: 1 2 3 4 5. (Show all looping methods – while loop, for loop and
do loop)
That is,
1 + 2 + 3 + 4 + 5
The sum is: 15