algoritmos e y g
TRANSCRIPT
![Page 1: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/1.jpg)
ALGORITMOS.
MARIA GUDALUPE_5_231_y_elias_15_231
GABRIELAVAZQUEZ
JUAREZ
![Page 2: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/2.jpg)
PASOS PARA PREPARAR UNA TAZA CAFE O TE
1_ INICIO
2_TAZA, AGUA, CUCHARA, CAFÉ, TE, AZUCAR, TAZA DE CAFÉ, TAZA DE TE
3_TAZA DE CAFE= TAZA ₊ CUCHARA ₊ AGUA ₊ CAFÉ ₊ AZUCAR
4_ TAZA DE TE= TAZA ₊ CUCHARA ₊ AGUA ₊ TE ₊ AZUCAR.
5_ FIN
INICIO
TAZA, AGUA, CUCHARA,
TAZA DE CAFÉ TAZA DE
TE.
TAZA DE CAFÉ= TAZA ₊
CUCHARA ₊ AGUA ₊ AZUCAR ₊
CAFÉ.
TAZA DE TE= TAZA ₊
CUCHARA ₊ AGUA ₊
AZUCAR ₊ TE.
FIN
![Page 3: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/3.jpg)
SUMAR 2 NUMEROS
1_ Inicio
2_ numero, suma, numero.
3_suma = numero ₊ numero
4_ suma
5_ fin
INICIO
NUMERO,
SUMA, NUMERO
SUMA= NÚMERO ₊
NUMERO
SUMA
FIN
![Page 4: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/4.jpg)
Sacar la edad de una persona.
1_ inicio
2_ edad, fecha de nacimiento y año actual.
3_edad= fecha de nacimiento – año actual.
4_ edad
5_ fin
INICIO
EDAD, FECHA DE
NACIMIENTO Y AÑO
ACTUAL.
EDAD= AÑO ACTUAL -
FECHA DE NACIMIENTO.
EDAD
FIN
![Page 5: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/5.jpg)
Sacar el área de un rectángulo.
1_ inicio
2_ área, base, altura
3_ área= base * altura
4_area
5_ fin
INICIO
AREA, BASE,
ALTURA.
AREA= BASE *
ALTURA
AREA
FIN
![Page 6: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/6.jpg)
SACAR AREA DE UN CÍRCULO:
1_ inicio
2_ área, radio, 3.1416
3_ área= radio * 3.1416
4_area
5_ fin
INICIO
AREA, RADIO,
3.1416
AREA= RADIO *
3.1416
AREA
FIN
![Page 7: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/7.jpg)
SACAR EL PERIMETRO DE UN RECTANGULO
1_ inicio
2_ perímetro, base, altura.
3_ perímetro= base ₊ altura ₊ base ₊ altura.
4_ perímetro
5_ fin
DIAGRAMA DE FLUJO:
INICIO
PERIMETRO,
BASE, ALTURA.
PERIMETRO= BASE ₊
ALTURA ₊BASE₊ ALTURA
PERIMETRO
FIN
![Page 8: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/8.jpg)
PROBLEMA:
ECUACION DE 2 VARIABLES
1_ Inicio
2_x, y, z
3_ x= y ₊ z
4_ x
5_ fin
INICIO
X, Y, Z.
X= Y ₊ Z
X
FIN
![Page 9: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/9.jpg)
ELABORAR UN SANDWICH DE POLLO:
1_ inicio
2_ sándwich, pan pollo, lechuga, aguacate, jitomate, etc.
3_ sándwich= pan ₊ pollo ₊ lechuga ₊ aguacate ₊ jitomate ₊ etc.
4_ sándwich
5_ fin
INICIO
SANDWICH, PAN, POLLO,
LECHUGA.AGUACATE,
JITOMATE, ETC.
SANDWICH= PAN ₊ POLLO₊ LECHUGA ₊
AGUACATE₊ JITOMATA ₊ ETC
SANDWICH
INICIO
![Page 10: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/10.jpg)
ELABORAR UN PASTEL DE CHOCOLATE
1_ inicio
2_ pastel, chocolate, masa, molde.
3_ pastel= chocolate ₊ masa ₊ molde
4_ pastel
5_ fin
INICIO
PASTEL, CHOCOLATE,
MASA, MOLDE, ARINA,
ETC…
PASTEL= CHOCOLATE₊ MASA₊
HARINA ₊ MOLDE ₊ ETC…….
PASTEL DE CHOCOLATE
INICIO
![Page 11: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/11.jpg)
AREA DE UN TRIANGULO
1_ inicio
2_ área, base, altura.
3_ área= base * altura / 2
4_ área
5_ fin
INICIO
AREA, BASE,
ALTURA.
AREA= BASE *
ALTURA/ 2
AREA
FIN
![Page 12: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/12.jpg)
1_ Inicio
2_ a, b, c.
3_d= a ₊ b ₊ c
4_ d
5_ fin
INICIO
A, B, C.
D= A₊ B ₊ C
D
FIN
![Page 13: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/13.jpg)
1_ Inicio
2_ a, b, c, d, e, f.
3_g= a ₊ b ₊c ₊ d ₊ e ₊ f
4_g
5_ fin
INICIO
A, B, C, D, E, F,
G= A₊ B₊ C ₊ D₊ E ₊ F
G
FIN
![Page 14: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/14.jpg)
ALGORITMO DE DECISION
sacar edad de una persona y determinar si puede o no votar.
1_ inicio
2_ edad, año actual, año de nacimiento.
3_ edad= año actual – año de nacimiento.
4_edad= mayor a 18 años si.
4.1_ vota de lo contrario no
5_ no vota
6_ fin
SI
INICIO
EDAD, AÑO ACTUAL,
AÑO DE NAC.
EDAD= AÑO ACTUAL – AÑO DE
NACIMIENTO
EDAD ≥ =
18 VOTA
NO VOTA
FIN
INICIO
EDAD, AÑOACT, AÑO DE
NAC.
EDAD= AÑO DE NAC – AÑO ACT.
EDAD ≥
= 18
CON= 50
FIN
![Page 15: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/15.jpg)
PROBLEMA:
Leer 2 valores distintos, determinar cual de los 2 es mayor y que lo
demuestre en la pantalla.
1_ inicio
2_ a, b
3_ a Mayor que b si es si
3.1_ mostrar A
4_ B mayor que A si es si
4.1_ mostrar B
5_ fin
SI
NO
SI
INICIO
A, B
A ≥ B
B≥ A
FIN
A
B
![Page 16: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/16.jpg)
PROBLEMA: lee 3 valores y almacénalos en las variable A, B, C mostrar en
pantalla cual es el valor menor considera que los valores son diferentes.
1_ inicio.
2_ A, B, C.
3_ A, B, C.
4_ A es menor que B si es si
4.1 mostrar A de lo contrario
5_ B es menor que A si es si
5.1_ mostrar B de lo contrario
6_ C es menor que A si es si mostrar C
7_ fin
SI
no
si
no
si
INICIO
A, B, C.
A, B, C.
A B
,
,; B A
FIN
A
B
C A C
1
![Page 17: Algoritmos e y g](https://reader033.vdocuments.co/reader033/viewer/2022052606/58eca24b1a28ab22478b4581/html5/thumbnails/17.jpg)
1.-inicio
2.-area, radio: 3.1416
3.-area=radio x radio x3.1416
4.-area
5.-fin
inicio
AREA, RADIO, 3.1416
AREA= RADIO x RADIO x 3.1416
AREA
Fin