Algorithm: Sequence of Steps That Give The Solution of A
Algorithm: Sequence of Steps That Give The Solution of A
problem.
PROBLEM C.
Convert any amount from pesos to dollars.
1- Start.
2- To know the amount of pesos to change (p)
3- To know the value of dollars (d)
4- To calculate the amount dividing the amount of pesos
over the value of the dollar ( R= P/D).
5- To express or display the result.
6- End.
PROBLEM D.
Calculate the area of a pentagon.
1- Start.
2- To know one side of the pentagon (s).
3- To know the measure of the apotem (AP).
4- To calculate the perimeter with the formula P=5s.
5- To calculate the area of the pentagon with the formula
A= P*AP/2 .
6- To express or display the result.
7- End.
PROBLEM E.
Determine if a person has the right to vote in the elections.
1- Start.
2- To know the age of the person (AG).
3- If the age is 18 or more go to step 4, else go to step 6.
4- Display the person can vote.
5- Go to step 7.
6- Display the person cannot vote.
7- End.
PROBLEM F.
Determine if a number is positive, negative or zero.
1- Start.
2- To know the number (n).
3- If n>0 go to step 4, else go to step 6.
4- Display or print the number is positive
5- Go to step 10 .
6- If N<0 go to step 7, else go to step 9.
7- Display or print the number is negative
8- Go to step 10.
9- Display or print the number is zero.
10End.
INTEGRATIVE ACTIVITY
N
F=1
F>N
I=1
F
TEND
F= F
Sum=
0
N>10
End
SUM
SUM=
N=n+1
N SUM+N
123456-
Start
N
A=0
SUM=
SUM<N
END
SUM
A=
B
B=
A=0
SUM=
0
B=1
A,B
SUM= A+B
SUM<N
END
A=
SUM
B=