1 / 19

ESCUELA :

Metodología y Tecnología de la Programación I. Ciencias de la Computación. ESCUELA :. Ing. Danilo Jaramillo H. PONENTE:. II Bimestre. BIMESTRE:. Octubre 2009 – Febrero 2010. CICLO:. Realizar el trabajo de forma personal Utilizar el EVA www.utpl.edu.ec Contestar los foros

laird
Download Presentation

ESCUELA :

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Metodología y Tecnología de la Programación I Ciencias de la Computación ESCUELA: Ing. Danilo Jaramillo H. PONENTE: II Bimestre BIMESTRE: Octubre 2009 – Febrero 2010 CICLO:

  2. Realizar el trabajo de forma personal • Utilizar el EVA www.utpl.edu.ec • Contestar los foros • Ejercicios, evaluaciones resueltas, problemas • Material adicional • Asesorías con el profesor • 07 – 2570 275 ext. 2637 (horario de tutoría) • Mail: djaramillo@utpl.edu.ec • Chat msn: djaramilloh@hotmail.com • Video llamadas skype: danilo.jaramillo.h

  3. Capítulo 5. Estructuras de Datos • Dentro de los tipos de datos estáticos • Colecciónde datos del mismo tipo • Enteros • Carácter • reales • Un nombre que lo identifica • posiciones

  4. Capítulo 5. Estructuras de Datos Aplicación • Sistema de Ecuaciones • Conjuntos • Tratamiento de una cantidad de datos

  5. Capítulo 5. Estructuras de Datos • Clasificación • Arreglos de una dimensión (vector) • Arreglos de dos dimensiones (matrices) • Arreglos multidimensionales Vec Mat

  6. Capítulo 5. Estructuras de Datos • Arreglos • Colección de datos del mismo tipo • Un nombre único • Indicador de posición que diferencia a cada elemento filas Mat MatRes filas y columnas

  7. Capítulo 5. Estructuras de Datos • Arreglos unidimensionales o vectores Mat fila Mat[1] = 2 Mat[2] = 9 Mat[3] = 14 Mat[4] = 15 Mat[5] = 6 Mat[6] = 25

  8. Capítulo 5. Estructuras de Datos Declaración nombrevariable : Arreglo[tamaño] tipo de dato Algoritmo matrices Clase matriz 1. Método Principal a. declaraciones Variables Mat: Arreglo [30] Entero

  9. Capítulo 5. Estructuras de Datos TIPOS Algoritmo matrices Clase matriz 1. Método Principal a. declaraciones Tipos Vector : Arreglo [30] Entero Variables A, B, C : Vector

  10. Algoritmo matrices Clase matriz 1. Método Principal a. declaraciones Variables Mat: Arreglo [30] Entero b. imprimir “ingrese numero de elementos” c. leer n_e d. for (i = 1; i <= n_e; i++) 1. leer Mat[i] e. endfor f. for (i = 1; i <= n_e; i++) 1. if (mat[i] mod 2) = 0 then imprimir “el número”, mat[i], “es par” 2. endif g. endfor h. for (i = 1; i <= n_e; i++) imprimir Mat[i] i. endfor j. fin método principal fin clase matriz

  11. Capítulo 5. Estructuras de Datos • Arreglos multi-dimensionales MatRes filas y columnas MatRes[1][1] = 2 MatRes[2][4] = 5 MatRes[3][2] = 7 MatRes[1][6] = 7 MatRes[2][1] = 8 MatRes[3][5] = 4

  12. Capítulo 5. Estructuras de Datos Declaración nombrevariable : Arreglo[tamaño_f][tamaño_c] tipo de dato Algoritmo matrices Clase matriz 1. Método Principal a. declaraciones Variables Mat: Arreglo [30][10] Entero

  13. Capítulo 5. Estructuras de Datos TIPOS Algoritmo matrices Clase matriz 1. Método Principal a. declaraciones Constantes L = 30 Tipos Matrices : Arreglo [L][L] Entero Variables A, B, C : Matrices

  14. Algoritmo matrices Clase matriz 1. Método Principal a. declaraciones Variables Mat: Arreglo [30][10] Entero b. imprimir “ingrese numero de filas y columnas” c. leer n_f,n_c d. for (i=1; i<=n_f; i++) 1. for (j=1:j<=n_c;j++) i. leer Mat[i][j] 2. endfor e. endfor f. for (i=1; i<=n_f; i++) 1. for (j=1:j<=n_c;j++) if (Mat[i][j] mod 2 = 0) then imprimir “numero es par” endif 2. endfor g. endfor 2. fin método principal

  15. EJERCICIOS PROPUESTOS • Ordenar un vector • Sumar dos vectores • Buscar elementos repetidos en un vector • Ordenar una matriz de dos dimensiones • Buscar elementos repetidos en una matriz dos dimensiones • multiplicar dos matrices

  16. Método Principal // ordenar un vector • a. Declaraciones • Mat[10] : Arreglo[10] entero • b. imprimir “ingrese numero de elementos” • c. leer n_e • d. for(i=1; i<=n_e; i++) • 1. leer Mat[i] • e. endfor • f. for(i=1; i<=n_e; i++) • 1. for(j=1; j<=n_e; j++) • if (mat[i] < mat[j]) then • aux  mat[i] • mat[i]  mat [j] • mat[j]  aux • endif • 2.endfor • g. endfor • h. for(i=1; i<=n_e; i++) • 1. imprimir Mat[i] • i. endfor • j. fin método principal

  17. Método Principal // suma de dos vectores a. Declaraciones Mat, Mat1, Mat2 : Arreglo[10] entero b. imprimir “ingrese numero de elementos” c. leer n_e d. imprimir “ingrese el primer vector” e. for(i=1; i<=n_e; i++) 1. leer Mat[i] f. endfor g. imprimir “ingrese el segundo vector” h. for(i=1; i<=n_e; i++) 1. leer Mat1[i] i. endfor j. for (i=1; i<=n_e; i++) 1. Mat2[i] = Mat[i] + Mat[j] l. endfor m. imprimir “el vector resultante es: ” n. for(i=1; i<=n_e; i++) 1. imprimir Mat2[i] o. endfor p. fin método principal

  18. contacto • Email: djaramillo@utpl.edu.ec • Skype: danilo.jaramillo.h • msn: djaramilloh@hotmail.com • Teléfono: 07-250275 ext 2637

  19. más UTPL SER DECIDE UNIDAD VIDEOCONFERENCIAS

More Related