This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library ieee; | |
| use ieee.std_logic_1164.all; | |
| entity MANCOS is port( | |
| CON1, CON2: in std_logic; | |
| CON3, CON4: in std_logic; | |
| S1, S2: inout std_logic; | |
| V1: out std_logic_vector(0 to 3); | |
| V2: out std_logic_vector(0 to 6)); | |
| end MANCOS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<bits/stdc++.h> | |
| //#include<iostream> | |
| //#include<stdio.h> | |
| using namespace std; | |
| //Distancia entera entre dos numeros | |
| int rango(int x, int y){ | |
| int o = 0; | |
| for(int s = x; s <= y; s++) o++; | |
| return o; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<bits/stdc++.h> | |
| //#include<iostream> | |
| //#include<stdio.h> | |
| using namespace std; | |
| void busq_ter(int * arr, int lim_i, int lim_s, int num){ | |
| if(num < arr[lim_i] || num > arr[lim_s]){ //Fuera de rango | |
| cout << "Numero fuera de rango paps" << endl; | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //#include<bits/stdc++.h> | |
| #include<iostream> | |
| #include<stdio.h> | |
| using namespace std; | |
| //Funcion recursiva, mando dos longs para partir el segundo | |
| long long mult(long long A, long long B){ | |
| long X; //Variable auxiliar | |
| if(B == 1) return A; // Caso Base | |
| //Si no, Parto y repito |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Ejemplo de medición de tiempo en C y recepción de parametros en C bajo UNIX | |
| //Compilación de la libreria: "gcc -c tiempo.c " (Generación del código objeto) | |
| //***************************************************************** | |
| //***************************************************************** | |
| //Librerias incluidas | |
| //***************************************************************** | |
| #include <sys/resource.h> | |
| #include <sys/time.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ---------------------------------------------------------------------------------- | |
| -- NOMBRES: | |
| -- Aguero Garcia Harold Sady | |
| -- Lara Hernandez Ricardo Luis | |
| -- GRUPO: 2CV6 | |
| -- Practica 1 "Funcionamineto se ISE" | |
| ---------------------------------------------------------------------------------- | |
| library IEEE; | |
| use IEEE.STD_LOGIC_1164.ALL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include "tiempo.h" | |
| int Producto2Mayores(int * A, int n){ | |
| int i,mayor1,mayor2; | |
| if(A[1] > A[2]) { | |
| mayor1 = A[1]; | |
| mayor2 = A[2]; | |
| } | |
| else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include "tiempo.h" | |
| void OrdenamientoIntercambio(int * A, int n){ | |
| int i,j,temp; | |
| for(i=0; i<n; i++) | |
| for(j=i+1; j<=n; j++) | |
| if(A[j] < A[i]){ | |
| temp = A[i]; | |
| A[i] = A[j]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include "tiempo.h" | |
| int MaximoComunDivisor(int m, int n){ | |
| int a,b, residuo; | |
| if(m>n){ a=m; b=n; } else { a=n; b=m; } | |
| residuo = 1; | |
| while(residuo > 0){ | |
| residuo = a % b; | |
| a = b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include "tiempo.h" | |
| void BurbujaSimple(int * A, int n){ | |
| int i,j,temp; | |
| for(i=0; i<n; i++) | |
| for(j=0; j<n-1; j++) | |
| if(A[j] > A[j+1]){ | |
| temp = A[j]; | |
| A[j] = A[j+1]; |