<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;DkAEQX0yeCp7ImA9WhZbFko.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472</id><updated>2011-06-21T11:45:00.390-05:00</updated><title>No Hay Nada Mas Engañoso Que Un Hecho Evidente..</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default?redirect=false&amp;v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry gd:etag='W/&quot;DkQESHczfSp7ImA9WhZbFko.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472.post-583518197727459433</id><published>2011-06-21T11:38:00.001-05:00</published><updated>2011-06-21T11:38:29.985-05:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-21T11:38:29.985-05:00</app:edited><title>METODOS DE ORDENAMIENTO [JAVA]</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;Para poder ordenar una cantidad determinada de números almacenadas en un vector o matriz, existen distintos métodos (&lt;span style='font-family:Arial'&gt;&lt;em&gt;algoritmos&lt;/em&gt;&lt;/span&gt;) con distintas características y complejidad.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Existe desde el método más simple, como el &lt;span style='font-family:Arial'&gt;&lt;em&gt;Bubblesort &lt;/em&gt;&lt;/span&gt;(o Método Burbuja), que son Simples iteraciones, hasta el &lt;span style='font-family:Arial'&gt;&lt;em&gt;Quicksort &lt;/em&gt;&lt;/span&gt;(Método Rápido), que al estar optimizado usando recursión, su tiempo de ejecución es menor y es más efectivo.&lt;br /&gt;&lt;/p&gt;&lt;h1&gt;METODOS ITERATIVOS&lt;br /&gt;&lt;/h1&gt;&lt;p&gt;Estos métodos son simples de entender y de programar ya que son iterativos, simples ciclos y sentencias que hacen que el vector pueda ser ordenado.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Dentro de los Algoritmos iterativos encontramos:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Burbuja&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Inserción&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Selección&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Shellsort&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;METODOS RECURSIVOS&lt;br /&gt;&lt;/h1&gt;&lt;p&gt;Estos métodos son aún más complejos, requieren de mayor atención y conocimiento para ser entendidos. Son rápidos y efectivos, utilizan generalmente la técnica &lt;span style='font-family:Arial'&gt;&lt;em&gt;Divide y vencerás&lt;/em&gt;&lt;/span&gt;, que consiste en dividir un problema grande en varios pequeños para que sea más fácil resolverlos.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Mediante llamadas recursivas a sí mismas, es posible que el tiempo de ejecución y de ordenación sea más óptimo.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Dentó de los algoritmos recursivos encontramos:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Ordenamiento por Mezclas (&lt;span style='font-family:Arial'&gt;&lt;em&gt;merge&lt;/em&gt;&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Ordenamiento Rápido (&lt;span style='font-family:Arial'&gt;&lt;em&gt;quick&lt;/em&gt;&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;METODO BURBUJA&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;    public static void burbuja(int[]matrix){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        int temp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        for(int i=1;i&amp;lt;matrix.length;i++){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            for (int j=0 ; j&amp;lt;matrix.length- 1; j++){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                if (matrix[j] &amp;gt; matrix[j+1]){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                    temp = matrix[j];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                    matrix[j] = matrix[j+1];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                    matrix[j+1] = temp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;METODO INSERCION &lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;public static void Insercion (int[] vector) {&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;      for (int i=1; i&amp;lt;vector.length; i++) {&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;         int aux = vector[i];&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;         int j;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;         for (j=i-1; j&amp;gt;=0 &amp;amp;&amp;amp; vector[j]&amp;gt;aux; j--){&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;              vector[j+1] = vector[j];&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;          }&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;         vector[j+1] = aux;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;      }&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;   }METODO SELECCIÓN&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;    public static void Seleccion(int[]matrix){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        int i, j, k, p, buffer, limit = matrix.length-1;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        for(k = 0; k &amp;lt; limit; k++){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            p = k;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            for(i = k+1; i &amp;lt;= limit; i++){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                if(matrix[i] &amp;lt; matrix[p]) p = i;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                if(p != k){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                    buffer = matrix[p];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                    matrix[p] = matrix[k];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                    matrix[k] = buffer;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;METODO SHELL SHORT&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;public static void shellSort(int[] matrix) {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    for ( int increment = matrix.length / 2;increment &amp;gt; 0;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;          increment = (increment == 2 ? 1 : (int) Math.round(increment / 2.2))) {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        for (int i = increment; i &amp;lt; matrix.length; i++) {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            for (int j = i; j &amp;gt;= increment &amp;amp;&amp;amp; matrix[j - increment] &amp;gt; matrix[j]; j -= increment) {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                int temp = matrix[j];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                matrix[j] = matrix[j - increment];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;                matrix[j - increment] = temp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;ORDENAMIENTO POR MEZCLAS (&lt;span style='font-family:Arial'&gt;&lt;em&gt;MERGE&lt;/em&gt;&lt;/span&gt;)&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;El algoritmo de ordenamiento por mezcla (&lt;span style='font-family:Arial'&gt;&lt;em&gt;Merge&lt;/em&gt;&lt;/span&gt;) se divide en dos procesos, primero se divide en partes iguales la lista:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;public static void mergesort(int[ ] matrix, int init, int n){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int n1;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int n2;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    if (n &amp;gt; 1){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        n1 = n / 2;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        n2 = n - n1;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        mergesort(matrix, init, n1);&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        mergesort(matrix, init + n1, n2);&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        merge(matrix, init, n1, n2);&lt;br /&gt;&lt;/p&gt;&lt;p&gt;   }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Y el algoritmo que nos permite mezclar los elementos según corresponda:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;private static void merge(int[ ] matrix, int init, int n1, int n2){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int[ ] buffer = new int[n1+n2];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int temp = 0;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int temp1 = 0;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int temp2 = 0;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int i;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    while ((temp1 &amp;lt; n1) &amp;amp;&amp;amp; (temp2 &amp;lt; n2)){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        if (matrix[init + temp1] &amp;lt; matrix[init + n1 + temp2]){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            buffer[temp++] = matrix[init + (temp1++)];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }else{&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            buffer[temp++] = matrix[init + n1 + (temp2++)];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    while (temp1 &amp;lt; n1){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        buffer[temp++] = matrix[init + (temp1++)];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    while (temp2 &amp;lt; n2){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        buffer[temp++] = matrix[init + n1 + (temp2++)];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    for (i = 0; i &amp;lt; n1+n2; i++){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        matrix[init + i] = buffer[i];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;ORDENAMIENTO RAPIDO&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;public static void Rapido(int matrix[], int a, int b){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    matrix = new int[matrix.length];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int buf;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int from = a;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int to = b;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    int pivot = matrix[(from+to)/2];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    do{&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        while(matrix[from] &amp;lt; pivot){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            from++;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        while(matrix[to] &amp;gt; pivot){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            to--;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        if(from &amp;lt;= to){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            buf = matrix[from];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            matrix[from] = matrix[to];&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            matrix[to] = buf;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;            from++; to--;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }while(from &amp;lt;= to);&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    if(a &amp;lt; to){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        Rapido(matrix, a, to);&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    if(from &amp;lt; b){&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        Rapido(matrix, from, b);&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}&lt;span style='font-family:Arial Unicode MS; font-size:14pt'&gt;&lt;br /&gt;				&lt;/span&gt;&lt;/p&gt;&lt;h1&gt;COMPLEJIDAD&lt;br /&gt;&lt;/h1&gt;&lt;p&gt;&lt;span style='font-size:14pt'&gt;&lt;span style='font-family:Arial Unicode MS'&gt;Cada algoritmo de ordenamiento por definici&lt;/span&gt;&lt;span style='font-family:Arial'&gt;ó&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;n tiene operaciones y c&lt;/span&gt;&lt;span style='font-family:Arial'&gt;á&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;lculos m&lt;/span&gt;&lt;span style='font-family:Arial'&gt;í&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;nimos y m&lt;/span&gt;&lt;span style='font-family:Arial'&gt;á&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;ximos que realiza (complejidad), a continuaci&lt;/span&gt;&lt;span style='font-family:Arial'&gt;ó&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;n una tabla que indica la cantidad de c&lt;/span&gt;&lt;span style='font-family:Arial'&gt;á&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;lculos que corresponden a cada m&lt;/span&gt;&lt;span style='font-family:Arial'&gt;é&lt;/span&gt;&lt;span style='font-family:Arial Unicode MS'&gt;todo de ordenamiento:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;table border='0' style='border-collapse:collapse'&gt;&lt;colgroup&gt;&lt;col style='width:302px'/&gt;&lt;col style='width:302px'/&gt;&lt;/colgroup&gt;&lt;tbody valign='top'&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Algoritmo&lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  solid 0.5pt; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Operaciones máximas&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Burbuja &lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Ω(n2)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Inserción &lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Ω(n2/4)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Selección &lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Ω(n2)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Shell &lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Ω(n log2n)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Merge &lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Ω(n logn)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  solid 0.5pt; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Quick&lt;/p&gt;&lt;/td&gt;&lt;td style='padding-left: 7px; padding-right: 7px; border-top:  none; border-left:  none; border-bottom:  solid 0.5pt; border-right:  solid 0.5pt'&gt;&lt;p&gt;Ω(n2) &lt;span style='font-size:10pt'&gt;en peor de los casos y &lt;/span&gt;Ω(n logn) &lt;span style='font-size:10pt'&gt;en el promedio de los casos.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;span style='font-family:Arial Unicode MS; font-size:14pt'&gt;EJERCIO PROPUESTO:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;Implementar una aplicación que registre 10 números y que muestre posteriormente los números impares  Ordenados En Forma Ascendente. Utilice Métodos De Ordenamiento.&lt;br /&gt;&lt;/div&gt;&lt;p style='text-align: justify'&gt;import javax.swing.JOptionPane;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;public class MetodosDeOrdenamiento {&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    public static void main(String [] args){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        int vector[] = new int[10];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        for(int i=0;i&amp;lt;vector.length;i++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            vector[i] = Integer.parseInt(JOptionPane.showInputDialog((i+1)+ "º Numero :",0));&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        String Cadena ="Numeros Sin Ordernar \n";&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        for(int i=0;i&amp;lt;vector.length;i++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            Cadena = Cadena + vector[i] + "    ";&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        Insercion(vector);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        Cadena = Cadena  + "\nNumeros Impares Ordenados De Forma Ascendente";&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        for(int i=0;i&amp;lt;vector.length;i++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            if(vector[i]%2!=0){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                Cadena = Cadena + "\n" +  vector[i] ;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        JOptionPane.showMessageDialog(null,Cadena);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt; &lt;/p&gt;&lt;p style='text-align: justify'&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;public static void Insercion (int[] vector) {&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;      for (int i=1; i&amp;lt;vector.length; i++) {&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;         int aux = vector[i];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;         int j;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;         for (j=i-1; j&amp;gt;=0 &amp;amp;&amp;amp; vector[j]&amp;gt;aux; j--){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;              vector[j+1] = vector[j];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;          }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;         vector[j+1] = aux;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;      }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;   }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt; Imágenes&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt; &lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt;					&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt;					&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt;					&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;div style='text-align: justify'&gt;Ingrese Nombres De Equipos de Futbol Con Su Respectivo Puntaje Visualizarlo Ordenados Por el Puntaje, Utilizando Métodos rápido Y Burbuja.&lt;br /&gt;&lt;/div&gt;&lt;p style='text-align: justify'&gt;import javax.swing.JOptionPane;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;public class MetodosDeOrdenamientoJugadores {&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;public static void main(String [] args){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    int x =Integer.parseInt(JOptionPane.showInputDialog("Ingrese Total De Equipos",0));&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    int puntos[]= new int[x];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    String equipos[]= new String[x];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    for(int i =0;i&amp;lt;x;i++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        equipos[i]= JOptionPane.showInputDialog("Ingrese Nombre De Equipo" );&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        puntos[i]= Integer.parseInt(JOptionPane.showInputDialog("Ingrese Puntos",0));&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    Burbuja(puntos,equipos);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    String Cadena = "Equipos Y Sus Puntos \n";&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    for(int i =0;i&amp;lt;x;i++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        Cadena = Cadena + equipos[i] + "     " + puntos[i] + "\n";&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    JOptionPane.showMessageDialog(null, Cadena);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt; &lt;/p&gt;&lt;p style='text-align: justify'&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;public static void Burbuja(int[]matrix,String[]equipos){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        int temp;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        String tempe;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        for(int i=1;i&amp;lt;matrix.length;i++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            for (int j=0 ; j&amp;lt;matrix.length- 1; j++){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                if (matrix[j] &amp;lt; matrix[j+1]){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                    temp = matrix[j];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                    matrix[j] = matrix[j+1];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                    matrix[j+1] = temp;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                    tempe = equipos[j];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                    equipos[j] = equipos[j+1];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;                    equipos[j+1] = tempe;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt; &lt;/p&gt;&lt;p style='text-align: justify'&gt;                }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;//a = Inicio ; b = Final&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;public static void Rapido(int matrix[], int a, int b){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    matrix = new int[matrix.length];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    int buf;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    int from = a;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    int to = b;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    int pivot = matrix[(from+to)/2];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    do{&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        while(matrix[from] &amp;lt; pivot){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            from++;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        while(matrix[to] &amp;gt; pivot){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            to--;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        if(from &amp;lt;= to){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            buf = matrix[from];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            matrix[from] = matrix[to];&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            matrix[to] = buf;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;            from++; to--;&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    }while(from &amp;lt;= to);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    if(a &amp;lt; to){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        Rapido(matrix, a, to);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    if(from &amp;lt; b){&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;        Rapido(matrix, from, b);&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;    }&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt; &lt;/p&gt;&lt;p style='text-align: justify'&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p style='text-align: justify'&gt;&lt;br /&gt;					&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939810610904161472-583518197727459433?l=luisbautistaba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/583518197727459433/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/metodos-de-ordenamiento-java.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/583518197727459433?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/583518197727459433?v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/metodos-de-ordenamiento-java.html' title='METODOS DE ORDENAMIENTO [JAVA]'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='12246963428791585773'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DEECRHo_fyp7ImA9WhZbFUw.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472.post-7870016711867332419</id><published>2011-06-19T15:19:00.007-05:00</published><updated>2011-06-19T15:51:05.447-05:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-19T15:51:05.447-05:00</app:edited><title>Mini Calculadora [VB.net]</title><content type='html'>&lt;span xmlns=""&gt;Descripción Del Ejemplo Es Una Calculadora Donde Nos Muestra 3 TextBox, Los Cuales 2 Serán Para Ingresar Los Números Y En Uno Se Mostrara El Resultado &lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg690/scaled.php?server=690&amp;amp;filename=29601055.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://desmond.imageshack.us/Himg690/scaled.php?server=690&amp;amp;filename=29601055.jpg&amp;amp;res=medium" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;Controles Y Sus Propiedades A Modificar&lt;span class="fullpost"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg96/scaled.php?server=96&amp;amp;filename=63838576.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns=""&gt;&lt;span class="fullpost"&gt;  &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg96/scaled.php?server=96&amp;amp;filename=63838576.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;table border="0" style="border-collapse: collapse;"&gt;&lt;colgroup&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: solid 0.5pt; padding-left: 7px; padding-right: 7px;"&gt;&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: solid 0.5pt; padding-left: 7px; padding-right: 7px;"&gt;Propiedades&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;1 label1&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Text = Numero 1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;2 label2&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Text = Numero 2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;3 TextBox1&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name = TxtN1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;4 TextBox2&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name = TxtN2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;5 Label3&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Text=&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;6 TextBox3&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name = TxtResultado&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;7 Button1&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name= BtnSuma&lt;br /&gt;
&lt;br /&gt;
Text = +&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;8 Button2&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name = BtnResta&lt;br /&gt;
&lt;br /&gt;
Text = -&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;9 Button3&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name = BtnMulti&lt;br /&gt;
&lt;br /&gt;
Text = *&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;10 Button4&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Name = BtnDivi&lt;br /&gt;
&lt;br /&gt;
Text = /&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;Para Realizar Este Ejemplo debemos tener en cuenta que Vb.net Tiene Operadores Aritméticos Para Cada Operación.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;table border="0" style="border-collapse: collapse;"&gt;&lt;colgroup&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: solid 0.5pt; padding-left: 7px; padding-right: 7px;"&gt;Operador&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: solid 0.5pt; padding-left: 7px; padding-right: 7px;"&gt;Descripción&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;+&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Suma&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;-&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Resta&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;*&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Multiplicación&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;/&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;División Real&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;\&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;División Entera&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;^&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Potenciación&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: solid 0.5pt; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Mod&lt;/td&gt;&lt;td style="border-bottom: solid 0.5pt; border-left: none; border-right: solid 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;"&gt;Resto De La División&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;Código Fuente De La Calculadora&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Private Sub BtnSuma_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles BtnSuma.Click
Label3.Text = BtnSuma.Text
TxtResultado.Text = CInt(TxtN1.Text) + CInt(TxtN2.Text)
End Sub

Private Sub BtnResta_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles BtnResta.Click
Label3.Text = BtnResta.Text
TxtResultado.Text = CInt(TxtN1.Text) - CInt(TxtN2.Text)
End Sub

Private Sub BtnMulti_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles BtnMulti.Click
Label3.Text = BtnMulti.Text
TxtResultado.Text = CInt(TxtN1.Text) * CInt(TxtN2.Text)
End Sub

Private Sub BtnDivi_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles BtnDivi.Click
Label3.Text = BtnDivi.Text
TxtResultado.Text = CInt(TxtN1.Text) / CInt(TxtN2.Text)
End Sub
&lt;/pre&gt;&amp;nbsp;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Resultado:&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg96/scaled.php?server=96&amp;amp;filename=63838576.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://desmond.imageshack.us/Himg96/scaled.php?server=96&amp;amp;filename=63838576.jpg&amp;amp;res=medium" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939810610904161472-7870016711867332419?l=luisbautistaba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/7870016711867332419/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/mini-calculadora-vbnet.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/7870016711867332419?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/7870016711867332419?v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/mini-calculadora-vbnet.html' title='Mini Calculadora [VB.net]'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='12246963428791585773'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DkQBRXw6eyp7ImA9WhZbFUw.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472.post-8897887080468354237</id><published>2011-06-18T20:10:00.005-05:00</published><updated>2011-06-19T15:12:34.213-05:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-19T15:12:34.213-05:00</app:edited><title>Formulario Simple Que Da Un Mensaje De Saludo [Vb.Net]</title><content type='html'>&lt;span xmlns=""&gt;Hola Que Tal , Para Iniciarnos En El Mundo De la  Programación. Debemos Comenzar Con Ejemplos Simples.&lt;br /&gt;
&lt;br /&gt;
En Este Ejemplo Comenzaremos Con Un Programa Muy Simple.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Para Eso Debemos Iniciar Visual Studio 2008.net Que es En Mi Caso.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img813.imageshack.us/img813/3020/41488339.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="151" src="http://img813.imageshack.us/img813/3020/41488339.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;span class="fullpost"&gt;
&lt;li&gt;&lt;div&gt;Crearemos Un Nuevo Proyecto.&lt;/div&gt;Menú Archivo/Nuevo Proyecto (Ctrl + N)&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img864.imageshack.us/img864/7292/18423607.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://img864.imageshack.us/img864/7292/18423607.jpg" width="191" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div&gt;Seleccionamos El Lengua De Programación, Tipo De Aplicación y Colocamos El Nombre Del Proyecto&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg846/scaled.php?server=846&amp;amp;filename=51194027.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://desmond.imageshack.us/Himg846/scaled.php?server=846&amp;amp;filename=51194027.jpg&amp;amp;res=medium" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;div&gt;Diseñamos Un Formulario Simple Que Contenga Los Siguientes Controles.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;1 Label&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;2 Button&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div&gt;1 TextBox&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg5/scaled.php?server=5&amp;amp;filename=74774815.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://desmond.imageshack.us/Himg5/scaled.php?server=5&amp;amp;filename=74774815.jpg&amp;amp;res=medium" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;Para Cambiarle El Texto Que Se Muestra En Cada Uno, Solo Es Necesario Ir a La Propiedad Text De Cada Control Y Colocarle El Que Mejor Se Prefiera.&lt;br /&gt;
&lt;br /&gt;
Deben Seleccionar El Control Dándole Clic E ir  A La Ficha De Propiedades Y Buscar La Propiedad Text.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg10/scaled.php?server=10&amp;amp;filename=74784304.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://desmond.imageshack.us/Himg10/scaled.php?server=10&amp;amp;filename=74784304.jpg&amp;amp;res=medium" width="134" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;Y Nos Quedara Algo Así.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg194/scaled.php?server=194&amp;amp;filename=46934097.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://desmond.imageshack.us/Himg194/scaled.php?server=194&amp;amp;filename=46934097.jpg&amp;amp;res=medium" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;div&gt;Ahora Comenzaremos Con La Programación. Para Este Ejemplo (Ingresaremos El Nombre Y Nos Devolverá Un Saludo) Simple No?&lt;/div&gt;Comenzaremos Con Darle Doble clic En Cada Button, Uno Para Saludar Y Otro Para Cerrar El Formulario.&lt;/li&gt;
&lt;/ul&gt;&lt;pre class="vb" name="code"&gt;Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show("Hola " + TextBox1.Text + "!!!")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;div&gt;Ejecutamos El Formulario(Tecla F5)&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg32/scaled.php?server=32&amp;amp;filename=35787051.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://desmond.imageshack.us/Himg32/scaled.php?server=32&amp;amp;filename=35787051.jpg&amp;amp;res=medium" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://desmond.imageshack.us/Himg269/scaled.php?server=269&amp;amp;filename=50267512.jpg&amp;amp;res=medium" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://desmond.imageshack.us/Himg269/scaled.php?server=269&amp;amp;filename=50267512.jpg&amp;amp;res=medium" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;nbsp; Este Fue Mi Primer Programa. Espero Les Sirva y Disculpen Si No lo Explico Muy Bien.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="margin-left: 36pt;"&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939810610904161472-8897887080468354237?l=luisbautistaba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/8897887080468354237/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/hola-que-tal-para-iniciarnos-en-el.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/8897887080468354237?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/8897887080468354237?v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/hola-que-tal-para-iniciarnos-en-el.html' title='Formulario Simple Que Da Un Mensaje De Saludo [Vb.Net]'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='12246963428791585773'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DUANQn87eyp7ImA9WhZbE0s.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472.post-527804325646232418</id><published>2011-06-17T17:29:00.000-05:00</published><updated>2011-06-17T22:29:53.103-05:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-17T22:29:53.103-05:00</app:edited><title>Metodo De Ordenamiento Por Seleccion [C#]</title><content type='html'>El ordenamiento por selección (Selection Sort en inglés ) es un algoritmo de ordenamiento que requiere operaciones para ordenar una lista de n elementos(Osea En Arreglos);&lt;br /&gt;
&lt;br /&gt;
Su funcionamiento es el siguiente:&lt;br /&gt;
&lt;br /&gt;
Buscar el mínimo elemento de la lísta&lt;br /&gt;
Intercambiarlo con el primero&lt;br /&gt;
Buscar el mínimo en el resto de la lista&lt;br /&gt;
Intercambiarlo con el segundo&lt;br /&gt;
&lt;br /&gt;
Y en general:&lt;br /&gt;
&lt;br /&gt;
Buscar el mínimo elemento entre una posición i y el final de la lista&lt;br /&gt;
Intercambiar el mínimo con el elemento de la posición i&lt;br /&gt;
&lt;br /&gt;
En Lo general El Algoritmo Es este:&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;int minimo=0;
for(i=0 ; i&amp;lt;n-1 ; i++)
{
&amp;nbsp;&amp;nbsp; minimo=i;
&amp;nbsp;&amp;nbsp; for(j=i+1 ; j&amp;lt;n ; j++)
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (x[minimo] &amp;gt; x[j]) minimo=j;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; temp=x[minimo];
&amp;nbsp;&amp;nbsp; x[minimo]=x[i];
&amp;nbsp;&amp;nbsp; x[i]=temp;
}
&lt;/pre&gt;&lt;br /&gt;
Ahora Aplicado En Un Problema Que tube En Modo Consola:&lt;br /&gt;
&lt;span class="fullpost"&gt;&lt;br /&gt;
&lt;pre class="c#" name="code"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
&amp;nbsp; &amp;nbsp; class Program
&amp;nbsp; &amp;nbsp; {

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void Main(string[] args)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Title = "Programa";
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write("Ingrese Numero De Alumnos: ");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int num = int.Parse(Console.ReadLine());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("\nNombre\t\t\tN1\tN2\tN3\tPromedio");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("======\t\t\t==\t==\t==\t========");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string[] nom = new string[15];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double[] n1 = new double[15];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double[] n2 = new double[15];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double[] n3 = new double[15];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double[] prom = new double[15];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double x;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; num; i++)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write("");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nom[i] = Console.ReadLine();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(24, 4 + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write("");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n1[i] = int.Parse(Console.ReadLine());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(32, 4 + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write("");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n2[i] = int.Parse(Console.ReadLine());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(40, 4 + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write("");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n3[i] = int.Parse(Console.ReadLine());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(48, 4 + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = (n1[i] + n2[i] + n3[i]) / 3;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(Math.Round(x, 2));
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prom[i] = x;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("\nPrecione Una Tecla Para Comenzar...");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadKey();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int n = num;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; n - 1; i++)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int posMin = i;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int j = i + 1; j &amp;lt; n; j++)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (prom[j] [color=red]&amp;gt;[/color] prom[posMin])
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; posMin = j;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double iaux = prom[i];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prom[i] = prom[posMin];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prom[posMin] = iaux;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string naux = nom[i];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nom[i] = nom[posMin];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nom[posMin] = naux;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double n1aux = n1[i];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n1[i] = n1[posMin];
&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n1[posMin] = n1aux;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double n2aux = n2[i];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n2[i] = n2[posMin];
&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n2[posMin] = n2aux;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double n3aux = n3[i];
&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n3[i] = n3[posMin];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n3[posMin] = n3aux;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("\nNombre\t\t\tN1\tN2\tN3\tPromedio");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine("======\t\t\t==\t==\t==\t========");
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int lineas= num + 7;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; n; i++)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(0, lineas + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(nom[i]);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(24, lineas + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(n1[i]);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(32, lineas + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(n2[i]);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(40, lineas + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(n3[i]);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.SetCursorPosition(48, lineas + i);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(Math.Round(prom[i],2));
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();
&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; }
}&lt;/pre&gt;&lt;br /&gt;
Lo Que Se realizo En Este Pequeño Programa Fue :&lt;br /&gt;
Ingreso El Numero De Alumnos. &lt;br /&gt;
Y Despues De Acabar Se Muestra Asi.&lt;br /&gt;
Disculpen que no Trabajo Con  Clases Es Que Soy Muy nuevo en Esto&lt;br /&gt;
Ejecucion.&lt;br /&gt;
Bueno Eso es en Orden Desendente  Si Quieren En Acsendente Cambien Solo El Simbolo De "&amp;lt;" x "&amp;gt;"&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img696.imageshack.us/img696/2281/imagenmk.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://img696.imageshack.us/img696/2281/imagenmk.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;La Imagen De Muestra...&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
Estoo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939810610904161472-527804325646232418?l=luisbautistaba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/527804325646232418/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/metodo-de-ordenamiento-por-seleccion-c.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/527804325646232418?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/527804325646232418?v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/metodo-de-ordenamiento-por-seleccion-c.html' title='Metodo De Ordenamiento Por Seleccion [C#]'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='12246963428791585773'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CEAMQXk6eip7ImA9WhZbE0g.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472.post-5973027863067307985</id><published>2011-06-15T17:55:00.000-05:00</published><updated>2011-06-17T18:19:40.712-05:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-17T18:19:40.712-05:00</app:edited><title>Numeros Enteros A Romanos [Java]</title><content type='html'>Aplicacion en Modo Consola de Java. Donde Ingresaremos Un Numero Entero Y Nos Retornara, El Numero Entero En Romano&lt;br /&gt;
Ejemplo: &lt;br /&gt;
&lt;pre class="java" name="code"&gt;Numero Ingresado 20 = XX
&lt;/pre&gt;&lt;br /&gt;
Codigo Fuente:&lt;br /&gt;
&lt;span class="fullpost"&gt;&lt;br /&gt;
&lt;pre class="java" name="code"&gt;import javax.swing.JOptionPane;
public class Romanos {

    /**
     * @param args
     */
    public static void main (String[] args) {
        //ingreso de total de arreglos
        int num = Integer.parseInt(JOptionPane.showInputDialog("Ingrese Total De Numeros",1));
        //declaramos el Arreglo
        int numeros[] = new int[num];
        //ingresar numeros
        for (int i=0;i&amp;lt;numeros.length;i++){
            numeros[i]= Integer.parseInt(JOptionPane.showInputDialog("Ingreso Nº " + (i+1) + " : ",1 ));
        }
        //mostrar y convertir
        String Str ="";
        for (int i=0;i&amp;lt;numeros.length;i++){
            Str = Str + "Numero " + numeros[i] + " = " + Romanos(numeros[i])+"\n";
        }
        JOptionPane.showMessageDialog(null, Str);

       
    }
    //Metodo Para Convertir Numeros Enteros A romanos. Devuelve Una Cadena.
    public static String Romanos(int num){
         int x;
         int mil,cent,dece,unid;
        mil=(num/1000);
        x=num%1000;
        cent=x/100;
        x=num%100;
        dece=x/10;
        unid=num%10;
        String ERDN="";
        switch(mil){
            case 1:
                ERDN = ERDN +"M";
                break;
            case 2:
                ERDN = ERDN +"MM";
                break;
            case 3:
                ERDN = ERDN +"MMM";
                break;
                 }
        switch(cent){
            case 1:
                ERDN = ERDN +"C";
                break;
            case 2:
                ERDN = ERDN +"CC";
                break;
            case 3:
                ERDN = ERDN +"CCC";
                break;
            case 4:
                ERDN = ERDN +"CD";
                break;
            case 5:
                ERDN = ERDN +"D";
                break;
            case 6:
                ERDN = ERDN +"DC";
                break;
            case 7:
                ERDN = ERDN +"DCC";
                break;
            case 8:
                ERDN = ERDN +"DCCC";
                break;
            case 9:
                ERDN = ERDN +"CM";
                break;
        }
        switch(dece){
            case 1:
                ERDN = ERDN +"X";
                break;
            case 2:
                ERDN = ERDN +"XX";
                break;
            case 3:
                ERDN = ERDN +"XXX";
                break;
            case 4:
                ERDN = ERDN +"XL";
                break;
            case 5:
                ERDN = ERDN +"L";
                break;
            case 6:
                ERDN = ERDN +"LX";
                break;
            case 7:
                ERDN = ERDN +"LXX";
                break;
            case 8:
                ERDN = ERDN +"LXXX";
            case 9:
                ERDN = ERDN +"XC";
                break;
                }
        switch(unid){
            case 1:
                ERDN = ERDN +"I";
                break;
            case 2:
                ERDN = ERDN +"II";
                break;
            case 3:
                ERDN = ERDN +"III";
                break;
            case 4:
                ERDN = ERDN +"IV";
                break;
            case 5:
                ERDN = ERDN +"V";
                break;
            case 6:
                ERDN = ERDN +"VI";
                break;
            case 7:
                ERDN = ERDN +"VII";
                break;
            case 8:
                ERDN = ERDN +"VIII";
                break;
            case 9:
                ERDN = ERDN +"IX";
                break;

        }
        return ERDN;
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939810610904161472-5973027863067307985?l=luisbautistaba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/5973027863067307985/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/numeros-enteros-romanos-java.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/5973027863067307985?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/5973027863067307985?v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/numeros-enteros-romanos-java.html' title='Numeros Enteros A Romanos [Java]'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='12246963428791585773'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CEQHSX4yfSp7ImA9WhZbEUo.&quot;'><id>tag:blogger.com,1999:blog-8939810610904161472.post-6970118369239789469</id><published>2011-06-15T16:12:00.000-05:00</published><updated>2011-06-15T16:12:18.095-05:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-06-15T16:12:18.095-05:00</app:edited><title>Hola Mundo</title><content type='html'>Bueno Empezando.. A Utilizar Bloger Se ve Muy Interesante..!! Espero Me Sirva!!&lt;br /&gt;
&lt;br /&gt;
Es Mi primer Entrada.&lt;br /&gt;
Att. Luis Bautista&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8939810610904161472-6970118369239789469?l=luisbautistaba.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luisbautistaba.blogspot.com/feeds/6970118369239789469/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/hola-mundo.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/6970118369239789469?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8939810610904161472/posts/default/6970118369239789469?v=2'/><link rel='alternate' type='text/html' href='http://luisbautistaba.blogspot.com/2011/06/hola-mundo.html' title='Hola Mundo'/><author><name>Luis</name><uri>http://www.blogger.com/profile/01176751074717822695</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='12246963428791585773'/></author><thr:total>0</thr:total></entry></feed>