Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Pseidocodigo
Pseidocodigo
PUNTO 1
================
Proceso sin_titulo
//Declaraci�n de Variables
Definir s1 ,s2 , s3, Notas_Defi, Notas_Regu, Notas_Buen, Notas_Exce Como
Entero;
//Cantidad de numero en donde el vector debe de llegar
s1<-20;
//Declaraci�n del tama�o del vector
Dimension s3[21];
//Contadores
Notas_Defi <-0;
Notas_Regu <-0;
Notas_Buen <-0;
Notas_Exce <-0;
=============
PUNTO 2
=============
Proceso INICIO
//DECLARACION DE VARIABLES
Definir s5, I,s1,s2,s3,s4,J,S6, x, s7 Como Entero;
//LONGITUD DE LOS VECTORES
Dimension s1(11),s2(11),s3(11),s4(11), s7[11];
Repetir
Limpiar Pantalla;
//MEN� PRINCIPAL
Escribir "____________MENU DE OPCIONES____________ " ;
Escribir "1=). LLENAR VECTOR A DE MANERA ALEATORIA." ;
Escribir "2=). LLENAR VECTOR B DE MANERA ALEATORIA." ;
Escribir "3=). C=A+B " ;
Escribir "4=). D=B-A " ;
Escribir "5=). MOSTRAR VECTORES";
Escribir "0=). SALIR" ;
//DATO DE ENTRADA
Leer s5;
segun s5 hacer
1:
2:
Escribir "PROCESANDO INFORMACI�N...";
Escribir "=======";
Escribir "=======";
Escribir "=======";
// Recorre los elementos y va asignandoles numeros
aleatorios
para I<-1 hasta 10 Hacer
s2(I)<-Aleatorio(-100,100);
FinPara
Escribir "VECTOR LLENADO";
Escribir "=======";
Escribir "=======";
Escribir "=======";
Escribir "LOS RESULTADOS SE MUESTRAN EN LA OPCION 5 DEL
MENU";
Escribir "PRESIONE ENTER PARA VOLVER AL MEN�";
Esperar Tecla;
3:
Escribir "C=A+B";
//Suma de los vectores A Y B
Para J<-1 Hasta 10 hacer
s3(J)<-s1(J)+s2(J);
FinPara
Escribir "VECTOR LLENADO";
Escribir "=======";
Escribir "=======";
Escribir "=======";
Escribir "LOS RESULTADOS SE MUESTRAN EN LA OPCION 5 DEL
MENU";
Escribir "PRESIONE ENTER PARA VOLVER AL MEN�";
Esperar Tecla;
4:
Escribir "D=B-A";
//RESTA DE LOS VECTORES B - A
Para J<-1 Hasta 10 hacer
s4(J)<-s2(J)-s1(J);
FinPara
Escribir "VECTOR LLENADO";
Escribir "=======";
Escribir "=======";
Escribir "=======";
Escribir "LOS RESULTADOS SE MUESTRAN EN LA OPCION 5 DEL
MENU";
Escribir "PRESIONE ENTER PARA VOLVER AL MEN�";
Esperar Tecla;
5:
Repetir
Limpiar Pantalla;
//MEN� DE RESULTADOS
Escribir "SE�OR USUARIO, TENGA PRESENTE QUE SI USTED
NO INICIALIZ� EL VECTOR, EL SISTEMA LE ARROJARA ERROR. ";
Escribir "__________MOSTRAR VECTORES________";
Escribir "1=) VECTOR A";
Escribir "2=) VECTOR B";
Escribir "3=) VECTOR C";
Escribir "4=) VECTOR D";
Escribir "5=) VECTOR F (VECTOR INVERSO DE A)";
Escribir "0=) VOLVER AL MENU PRINCIPAL";
Escribir "DESEA USTED LA OPCI�N: ";
//DATO DE ENTRADA
leer s6;
Segun s6 Hacer
1:
Esperar Tecla;
0:
Escribir "EJECUCION FINALIZADA";
Finsegun
Finsegun
Hasta Que s5==0;
FinProceso
//FIN DEL PROGRAMA
===========
PUNTO 3
===========
TERCER_PUNTO
|
| Escribir "===TORNEO DE CARRERAS DE CABALLO===";
| Escribir "DISTANCIA RECCORRIDA POR LOS CABALLOS EN METROS"!
| Leer DIST;
| F<-2
| /*
| Diccionario
|
| s1<- Nombre del Jockey
| s2<- Nombre del Caballo
| s3<- Edad
| s4<- Peso
| s5<- Raza
| s6<- Tiempo
| */
| Dimension s1(X)
| Dimension s2(X)
| Dimension s3(X)
| Dimension s4(X)
| Dimension s5(X)
| Dimension s6(X)
| Dimension RESU(X)
| Definir s1,s2,s5 Como Caracter
| Definir s4,RESU,s6 Como real
| Definir s3 como Entero
| //REGISTRO
*/
Cadena s1[100]
Real s2
Cadena s3[100]
Entero s4
Fin Registro
//==================================================================
Arreglo[100] de Cadena[100] SOBREPESO
Arreglo[100] de RESS PRODUCTO
Entero I,CONT, Aleatorio
Inicio
Para I<-1 Hasta 100 Haga
Escribir "REGISTRO DE RES No.",I
Llamar nueva_linea
Escribir "DECLARE EL NOMBRE DE SERIE DE LA RES"
Lea PRODUCTO[I].s1
Llamar nueva_linea
Escribir "INGRESE EL SEXO DE LA RES";
Escribir "SI ES HEMBRA(1) O MACHO(2)";
Leer PRODUCTO[I].s3;
Llamar nueva_linea
Escribir "INGRESE EL PESO DE LA RES ";
Lea PRODUCTO[I].s2
Llamar nueva_linea
PRODUCTO[I].s2<-Aleatorio()*10
Fin Para
//==================================================================
Para I<-1 Hasta 100 Hacer
Escribir "DATOS OBTENIDOS DE LA RES NUMERO ",I
Llamar nueva_linea
Escribir "NOMBRE DE SERIE: ",PRODUCTO[I].s1
Llamar nueva_linea
Si PRODUCTO[I].s3="1" Entonces
Escriba "SU RES ES HEMBRA"
Sino
Escriba "SU RES ES MACHO"
Fin Si
Llamar nueva_linea
Escribir "PESO DE LA RES: ",PRODUCTO[I].s2
Llamar nueva_linea
Si PRODUCTO[I].s4=0 Entonces
PRODUCTO[I].s4<-Aleatorio()*10
Escribir "SU EDAD ES ",PRODUCTO[I].s4
Sino
Escribir "SU EDAD ES ",PRODUCTO[I].s4
Fin Si
Llamar nueva_linea
Fin Para
/=================================================================
Para I<-1 Hasta 100 Haga
Si PRODUCTO[I].s3="1" Entonces
Si PRODUCTO[I].s2>40 Entonces
CONT<-CONT+1
Llamar nueva_linea
SOBREPESO[I]<-PRODUCTO[I].s1
Fin Si
Sino
Fin Si
Fin Para
Si CONT>0 Entonces
Escriba "LISTA DE VACAS CON SOBREPESO: "
Para I<-1 Hasta 100 Hacer
LLamar nueva_linea
Escriba SOBREPESO[I]
Fin Para
Fin Si
Fin