Examples of Sequential Algorithms
Examples of Sequential Algorithms
Read the salary of three employees and apply an increase of 10, 12, and 15%
respectively. Display the result.
2. Write a program that calculates the salary of a worker in the following way.
The worker earns a fixed hourly rate and a 10% tax is deducted from it.
about the rent. The program should ask for the worker's name, the hours worked and the
price charged per hour. It should print the gross salary, the income tax deduction
and the salary to be paid.
3. Program that asks for the price of an item and calculates its value by applying a 16% VAT.
4. Given a time measurement expressed in hours, minutes, and seconds with values
arbitrary, create a program that transforms this measure into a correct expression. For
Example, given the measure 3h 118m 195s, the program should obtain as a result 5h 1m
15s.
5. Write a program that calculates the area of a right triangle, given the height and the base.
base.
is equivalent.
it is equivalent.
equivalent.
11. Develop a program that performs the conversion from pounds to kilograms
Where 1 Kg. = 2.2046 pounds.
Therefore, the user will provide the data of N pounds and the program will say how many
kilograms equivalent.
1. Write an algorithm that reads the four grades of a student and prints them.
final note.
2. Write an algorithm that reads the four grades of a student in each one
from the three subprojects that he/she is enrolled in and print the final grade of each
subproject and the average of the three final grades:
3. Write an algorithm that calculates and prints the area of a triangle:
A salesperson receives a 10% commission on the total sales of the month. The
wants to know how much he will earn in a month during which he had three sales:
Start
read base salary, sale1, sale2, sale3
sale1 + sale2 + sale3
commission = subtotal * 0.10
total = base salary + commission
print total
end
A store offers a 15% discount on each purchase. A customer wants to
to know how much you will have to pay for your purchase:
Start
read amount
discount = amount * 0.15
total = amount - discount
print total
end
6. If one dollar is equivalent to 2.15 bolívares. Create an algorithm that prints in
dollars an amount X of bolivars.
Start
read x
x/1.15
print X
end
Exercise:
Three people decide to invest their money to form a company. Each one of
they invest a different amount. Make an algorithm that prints the
percentage that each person invests in relation to the total investment