TIC English: Development of algorithms
Enviado por Robdlink1 • 1 de Febrero de 2015 • 284 Palabras (2 Páginas) • 148 Visitas
Elaborate the next sequential algorithm:
1. Determinate the Perimeter of a rectangle
1.- Start
2.- Input b, h
3.- Calculate p
P = (2b) + (2h)
4.- Print Perimeter P
5.- End
2. Convert any quantity from pesos to dollars.
1.- Start
2.- Input Pesos, Price of Dollar
3.- Calculate Pesos to Dollars
Dollar = Pesos/Price of Dollar
4.- Print Dollar
5. End
3. Determinate the area of a pentagon
1.- Start
2.- Input l, a, p
3.- Calculate p
P = l*5
4.- Print Perimeter P
5.- Calculate area
A = (P)a/2
6.- Print Area A
7.- End
4. Determinate the final speed of an automobile if its initial speed is zero and its acceleration is 0.8 m/ s2 and the time passed is 30 seconds
1.- Start
2.- Input a, t
3.- Calculate Fs
Fs = (0.8m/s2 * 30)
4.- Print Final speed Fs
5.- End
Elaborate the next conditional algorithm
1. Determines whether a person is entitled to vote in elections. Note considers the age of entitlement to vote is equal to or greater than 18 years.
1.- Start
2.- Ask the age of a person
3.- Compare the age (Age is greater or equal to 18 years old) then
4.- Yes: The person can vote, go to step 6
5.- No: The person can not vote
6.- End
2. Determine whether a student has passed or failed the course of Information and Communication Technology 2, based on three exams. Note: You must first calculate the average and based on this calculation to determine if this approved or not.
1.- Start
2.- Input Ex1, Ex2, Ex3
3.- Calculate sum of exams
S = (Ex1) + (Ex2) + (Ex3)
4.- Print Sum S
5.- Calculate Average
A = S/3
6.-Print Average A
7.- Passed: A > = 70, go to step 9
8.- Failed: A < 70
9.- End.
3. Determinate if any number is positive, negative or zero.
1.- Start
2.- Input x
3.- Zero: x=0, go to step 6
4.- Positive: x>0, go to step 6
5.- Negative: x<0
6.- End
...