Sequential Algorithm Exercises
Sequential Algorithm Exercises
A student wants to know what their final grade will be in the subject of Algorithms. This grade is made up of the
following percentages:
55% of the average of your three partial grades.
30% of the final exam grade.
15% of the grade for a final project.
A teacher wants to know what percentage of men and what percentage of women there are in a group of students.
3) Given an amount in pesos, obtain the equivalence in dollars, assuming that the exchange rate is a given data.
unknown.
4) In a hospital, there are three areas: Gynecology, Pediatrics, Traumatology. The annual budget of the hospital is distributed
according to the following table:
Area Percentage of the budget
Gynecology 40%
Traumatology 30%
Pediatrics 30%
Get the amount of money that each area will receive, for any budget amount.
5) The owner of a store buys an item at a specified price. Determine the price at which it should be sold to
obtain a profit of 30%.
Every Monday, Wednesday, and Friday, a person runs the same route and times the results. Determine the
average time it takes for a person to travel the route in any given week.
Three people decide to invest their money to start a business. Each of them invests a different amount.
Obtain the percentage that each person invests with respect to the total amount invested.
8) A student wants to know what their overall average will be in the three most difficult subjects they are taking and what it will be
average you will obtain in each of them. These subjects are evaluated as shown below:
The Mathematics grade is obtained in the following way:
Exam 90%
Average of tasks 10%
In this subject, a total of three tasks were assigned.
The Physics grade is obtained as follows:
Exam 80%
Average of tasks 20%
In this subject, a total of two assignments were requested.
The Chemistry grade is obtained in the following way:
Exam 85%
Average of tasks 15%
In this subject, an average of three assignments was requested.
9) The pressure, volume, and temperature of a mass of air are related by the formula:
11) Calculate the new salary of a worker if they received a 25% increase on their previous salary.
13) Create an algorithm that calculates the area of a sphere: area sphere = 4 * PI * radius2
Read the salary of three employees and apply an increase of 10%, 12%, and 15% respectively. Display the result.
15) Given a time measurement expressed in hours, minutes, and seconds with arbitrary values, create a program that
transform this measurement into a correct expression. For example, given the measure 3h 118m 195s, the program should
obtain a result of 5h 1m 15s.
16) Develop a program that converts cm. to inches.
Where 1 cm = 0.39737 inches.
Therefore, the user will provide the data in cm, and the program will tell how many inches it is equivalent to.
17) Write a program that calculates the salary of a worker as follows. The worker earns a fixed price.
for now and a 10% discount was applied for income tax. The program should ask for the name of the
worker, the hours worked and the price he charges per hour. The output should print the gross salary, the discount of
rent and the salary to be paid.
20) Develop a program that performs the conversion from feet to meters
Where 1 m = 3.2808 feet.
Therefore, the user will provide the data of N feet and the program will say how many meters it equals.
23) Calculate the value of the hypotenuse if the values of its legs are known.
24) Write an algorithm that reads the four grades of a student in each of the three subprojects they are taking and
print the final grade of each subproject (remember that each subproject has 4 grades) and the average of the three
final notes.
25) Create a program that asks for the value of 3 items and displays the total and the average. Try to format the result so that it is
show the values aligned and with the same decimals.
26) Create a program that given the voltage in volts and the resistance in ohms, calculates the current.
Application of this formula: Intensity = Voltage / Resistance