Академический Документы
Профессиональный Документы
Культура Документы
INGENIERA ELCTRICA
ALGORITMOS Y LENGUAJE DE PROGRAMACION
TTULO:
Realizar un programa men en donde se pueda seleccionar los siguientes de opciones de
aplicacin:
AUTORES.
CRDOVA GUARACA LUZ VANESSA
CUENCA MORALES WILMER RENE
Enero de 2016
LATACUNGA - ECUADOR.
Fin Si
Fin Si
Si n es multiplo de 2 Entonces
Escribir "El numero es par"
Sino
Escribir "El numero es impar"
Fin Si
Fin Si
Si Op=6 Entonces
Escribir "LISTA DE N NUMEROS INGRESADOS: SABER CUANTOS SON
PARES Y CUANTOS SON IMPARES"
escribir "ingrese la cantidad de numeros"
Leer n
a=0
b=0
Para i<-1 Hasta n Con Paso 1 Hacer
Escribir "ingrese valor"
leer V
Si V mod 2=0 Entonces
Escribir "es par ", V
a1=a1+1
Sino
Escribir "es impar ", V
a2=a2+1
FinSi
Fin Para
Escribir "pares", a1
Escribir "impares", a2
Fin Si
Si Op=7 Entonces
Escribir "LISTA DE NMEROS DE LA SERIE DE FIBONNACCI HASTA N"
Escribir "Ingrese la cantidad de numeros a desplegarse"
leer n
a=1
b=0
Para i<-1 Hasta n Con Paso 1 Hacer
Escribir a
a<-a+b
b<-a-b
Fin Para
Fin Si
Si Op=8 Entonces
Escribir "FACTORIAL DE UN NMERO"
Escribir "Ingrese un valor"
leer n
f=1
Para i<-1 Hasta n Con Paso 1 Hacer
f<-f*i
Si Op=9 Entonces
Escribir "SABER SI UN NUMERO ES PRIMO"
Escribir "ingrese un numero"
Leer n
i<-2
Mientras i<n y n mod i<>0 Hacer
i<-i+1
Fin Mientras
si i=n Entonces
escribir "el numero es primo"
Sino
Escribir "el numero no es primo"
FinSi
Fin Si
Si Op=10 Entonces
Escribir "VALIDACION DE CDULA"
Definir a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 Como Entero
Leer a1, a2, a3, a4, a5, a6, a7, a8, a9, a10
a=a1*2
Si a>9 Entonces
a=a-9
Fin Si
c=a3*2
Si c>9 Entonces
c=c-9
Fin Si
e=a5*2
Si e>9 Entonces
e=e-9
Fin Si
g=a7*2
Si g>9 Entonces
g=g-9
Fin Si
i=a9*2
Si i>9 Entonces
i=i-9
Fin Si
impares=a+c+e+g+i
Escribir "esto es: ", impares
pares=a2+a4+a6+a8
Escribir "esto es: ", pares
total=pares + iimpar
Escribir total
Si total<-10 Entonces
total=total - 10
Escribir total
Sino
Fin Si
Si total<20&&total>10
total=total-20
Escribir total
Sino
Fin Si
Si total<30&&total>20
total=total-30
Escribir total
Sino
Fin Si
Si total<40&&total>30
total=total-40
Escribir total
Sino
Fin Si
Si total<50&&total>40
total=total-50
Escribir total
Sino
Fin Si
Si total<60&&total>50
total=total-60
Escribir total
Sino
Fin Si
Si total<70&&total>60
total=total-70
Escribir total
Sino
Fin Si
Si total<80&&total>70
total=total-80
Escribir total
Sino
Fin Si
Si total<90&&total>80
total=total-90
Escribir total
Sino
Fin Si
Fin Si
Si Op=11 Entonces
Entonces
Entonces
Entonces
Entonces
Entonces
Entonces
Entonces
Entonces
Si op=12 Entonces
Escribir "ENCONTRAR EL VALOR DE LA SERIE_1 HASTA n (2/a^2 -4/a^4
+6/a^6 -8/a^8 n)"
Escribir "Ingrese la cantidad de secuencialidad"
leer can
Escribir "Ingrese el valor de a"
leer d
expo=2
a=1
b=0
ac1=0
///positivos
Para i<-1 Hasta can Con Paso 2 Hacer
ac1=a/(d^expo)
expo= expo+4
a=a+b
b=a-b
a=a+b
b=a-b
Fin Para
///negativos
expo=4
a=1
b=0
ac2=0
a=a+b
b=a-b
Para i<-1 Hasta can Con Paso 2 Hacer
ac2=a/(d^expo)
expo= expo+4
a=a+b
b=a-b
a=a+b
b=a-b
Fin Para
r=ac1-ac2
Escribir "El resultado de la serie es: " , r
Fin Si
Si Op=13 Entonces
Escribir "INGRESAR UNA LISTA DE N NMEROS, SABER CUANTOS
NUMEROS PRIMOS Y CUANTOS NUMEROS, NO PRIMOS FUERON INGRESADOS"
acum1=0
acum2=0
escribir "ingrese la cantidad de numeros"
Leer n
a=0
b=0
Para i<-1 Hasta n Con Paso 1 Hacer
Escribir "ingrese valor"
leer V
Si V mod 2=0 Entonces
Escribir "no es primo ", V
acum1=acum1+1
Sino
Escribir "es primo ", V
acum2=acum2+1
FinSi
Fin Para
Escribir "primos", acum2
Escribir "no primos", acum1
Fin Si
Si Op=14 Entonces
Escribir "REALIZAR UNA SIMULACION DE RIFA DAR TRES
OPORTUNIDADES Y SALIR"
Escribir "ingresar un numero entre el 1 y 25 al azar"
Escribir "tiene tres oportunidades de ganar"
Para i<-1 Hasta 3 Con Paso 1 Hacer
Leer n
Si n=15 Entonces
Escribir "Usted es el ganador"
Sino
Si n=2 Entonces
Escribir "Usted es el Ganador"
Sino
Si n=19 Entonces
Escribir "Usted es el ganador"
Sino
Escribir "suerte para la proxima"
Fin Si
Fin Si
Fin Si
Fin Para
Escribir "Gracias por participar"
Fin Si
Si Op=15 Entonces
Escribir "ENCONTRAR EL VALOR DE LA SERIE_2 HASTA n"
Escribir "escribir la cantidad de numeros que desee que aparezca de
la serie"
Leer n
a=1
b=0
i=0
Para i<-1 Hasta n Con Paso 1 Hacer
r<-i* 2
Escribir p1,r,"!/ ",p,"^",a
a<-a+b
b<-a-b
Si i mod 2=0 Entonces
Escribir p=a
p1=""
Sino
p1="-"
Escribir p=b
Fin Si
Fin Para
Fin Si
PRUEBA DE ESCRITORIO
OPCIN 1
OPCIN 2
OPCIN 3
OPCIN 4
OPCIN 5
OPCIN 6
OPCIN 7
OPCIN 8
OPCIN 9
OPCIN 10
OPCIN 11
OPCIN 12
OPCIN 13
OPCIN 14
OPCIN15
DIAGRAMA DE FLUJO