Heinsohn Privacidad y Ciberseguridad para el sector educativo
Pseudocodigo y una prueba de escritorio
1.
2. 1.- INDICAR SI UN ALUMNO ESTA APROBADO CALIFICACIÓN MAYOR O IGUAL DE 6 Y
REPROBADO EN CASO
2.- EN LA COMPRADE UN PANTALÓN SI EL PRECIO ES MAYOR DE 100 HACER UN
DESCUENTO DE 20% Y SI VALE MENOS DE 100PESOS SU DESCUENTO ES DE 10%
Autor:Cristian Leonardo TorresTristán
Inicio
Variables: Pantalón,Descuento, Pago:
Numérico Entero
Escribir “Indica el precio del pantalón”
Leer Pantalón
Si Pantalón>=100entonces
PRUEBA DE ESCRITORIO
Si Pantalón=120
Descuento=Pantalón*.20
Descuento=120*.20
Descuento=24
Pago=Pantalón-Descuento
Pago=120-24
Pago=96
Si Pantalón=90
Autor:Cristian Leonardo TorresTristán
Inicio
Variables: Calificación: Numérico Entero
Escribir “Indica la calificación”
Leer Calificación
Si Calificación>=6 entonces
Escribir “Aprobado”
Si Calificación<=5 entonces
Escribir “Reprobado”
Fin
PRUEBADE ESCRITORIO
Si Calificación=6 entonces
“Aprobado”
Si Calificación= 5 entonces
“Reprobado”
3. Escribir “20% de descuento”
Descuento= Pantalón*.20
Pago=Pantalón-Descuento
Si Pantalón<=100entonces
Escribir “10% de descuento”
Descuento= Pantalón*.10
Pago=Pantalón-Descuento
Fin
Descuento=Pantalón*.20
Descuento=90*.10
Descuento=9
Pago=Pantalón-Descuento
Pago=90-9
Pago=81
3.-PROGRAMAQUE INDIQUE LA ENTRADA AL CINE SI LA PERSONA TIENE MAS DE 18
AÑOS, EN CASO CONTRARIA SE LE NIEGA LA ENTRADA
Autor:Cristian Leonardo TorresTristán
Inicio
Variables: Edad: Numérico Entero
Escribir “Indica la Edad”
Leer Edad
Si Edad>= 18 años
Escribir “ACEPTADO”
Si Edad<=17 añosentonces
Escribir “NEGAR”
Fin
PRUEBA DE ESCRITORIO
Si Edad=19 entonces
“Aceptado”
Si Edad=15 entonces
“Negar”
4. 5.-EL SEÑOR CUMPLEAÑERO DESEA QUE REALICES UN PROGRAMAEN DONDE LE
MENCIONE CUANTOS DIAS TIENE CADA MES DE ESTE AÑO 2015, POR EJEMPLO: SI DAS
DE ENTRADA EL MES DE ENERO, EL PROGRAMADEBERA DE DECIRLE QUE TIENE 31
DIAS.
Autor:Cristian Leonardo TorresTristán
Inicio
Variables: Enero, Febrero, Marzo, Abril,
Mayo, Junio, Julio, Agosto,Septiembre,
Octubre, Noviembre, Diciembre, Mes:
Numérico Entero
Escribir “Dame el nombre del mes”
Escribir “Introducir Enero”
Leer Enero
Escribir “Introducir Febrero”
Leer Febrero
Escribir “Introducir Marzo”
Leer Marzo
Escribir “Introducir Abril”
Leer Abril
Escribir “Introducir Mayo”
Leer Mayo
Escribir “Introducir Junio”
Leer Junio
Escribir “Introducir Julio”
Leer Julio
Escribir “Introducir Agosto”
Leer Agosto
Escribir “Introducir Septiembre”
Leer Septiembre
Escribir “Introducir Octubre”
PRUEBA DE ESCRITORIO
5. 5.- EL SEÑOR AGUAYONVENDE MARISCOS Y TIENE 3 PROVEEDORES, EL PRIMER
PROVEEDOR LE OFRECE 100 KILOS DE CAMARONA $40.00EL KILO, EL SEGUNDO
PROVEEDOR LE OFRECE 200 KILOS DE CAMARONA $60.00EL KILO Y EL TERCER
PROVEEDOR LE OFRECE 150 KILOS DE CAMARONA $30.00 EL KILO.
EL PROGRAMADEBERA DE INDICAR CUAL DE TODOS LOS PROVEEDORES LE OFRECE
EL MEJOR PRECIO POR KILO AL SEÑOR AGUAYON, TOMANDO LAS DECISIONES
NECESARIAS PARA COMPARAREL MEJOR DE TODOS
AUTOR: CRISTIAN LEONARDO TORRES
TRISTÁN
INICIO
VARIABLES: KILOS, PRECIO, P1, P2, P3:
NUMERICO REAL
ESCRIBIR “INDICAR CUAL DE TODOS LOS
PROVEEDORES LE OFRECE EL MEJOR
PRECIO POR KILO AL SEÑOR AGUAYON”
ESCRIBIR “PROVEEDOR 1”
LEER P1
ESCRIBIR “PROVEEDOR 2”
LEER P2
ESCRIBIR PROVEEDOR 3”
LEER P3
PRUEBA DE ESCRITORIO
SI PROVEEDOR: P1- 1K=$40, P2-1K=$60, P3-
1K=$30
PRECIO MENOR: P1: 40/100=0.4,P2:
60/200=0.3, P3: 30/150=0.2
PRECIO MENOR= P3
Leer Octubre
Escribir “Introducir Noviembre”
Leer Noviembre
Escribir “Introducir Diciembre”
Leer Diciembre
FIN