|
|
|
|
Configuration: Windows Vista Firefox 2.0.0.11
Salut voici mon code en java j'espere qu'il taide.........mais j'ai une petite question vous pover m'envoyer un programme en code java concernat l'encryption decryption merci en tout cas
public staic void TriRapide (int [] tab){ int N=tab.length; Trirapide(tab,0,N-1);} private staic int partition(int [] tab,int l,int r){ int i=l;//indexe of left to right; int k=r-1;// indexe of right to left int temp; if(r-l>=1)//check there is two eltement to start {int pivot =tab[r]; while(k>i){// left and right indice not meet while((tab[i]<pivot)&&(k>i)) i++; while ((tab[k]>pivot)&&(k>i)) k--; if(k> i){ //put pivot into its final place while((tab[i]>pivot)&&(tab[k]<pivot) { temp=tab[k]; tab[k]=tab[i]; tab[i]=temp;}//swap(tab,i,k) else{ if(tab[i]>pivot) { temp=pivot; pivot=tab[i]; tab[i]=temp;} }//fin else else //if there is one element in the partition {return i;} }//fin partition private sativ void Trirapide(int [] tab,int l,int r) { if(l<r) { int positionpivot=partition(tab,l,r); TriRapide(tab,l,positionpivot-1); TriRapide(tab,positionpivot+1,r); } } //fonction de creation d'un tableau public static void afficher(int [] tab){ for(int i=0;i<tab.length;i++) System.out.println(tab[i]+""); System.out.println();} //Fonction principale public static void main (String [] args) { int N; N=Integer.parseInt(JOptionPane.showInputDialog("Donner la taille")); int [] tab=new int[N]; for(int i=0;i<tab.length;i++){ tab[i]=Integer.parseInt(JOptionPane.showInputDialog("Entrer i SVP"));} System.out.println("Tableau initiale :"); afficher(tab); TriRapide(tab); System.out.println("Tableau trier :"); afficher(tab); } } |
| 01/12 01h39 | [Javascript] convertisseur d'unités de mesures scientifiques | Javascript |
| 26/09 11h31 | Java Runtime Machine | Navigateurs |
| 04/11 00h40 | [Bash] Fermeture de session | Bash |
| 05/11 11h45 | [Javascript] Date de dernière modification | Javascript |
| 05/11 11h52 | [Javascript] Effacer un champ de formulaire lors du clic (focus) | Javascript |
| 04/09 18h41 | TRI RAPIDE D'un tableau de pointeur Pff... | 7 |
| 02/07 16h17 | Tri rapide par pointeur | 4 |
| 31/05 13h31 | Trie en java [VECTOR] | 5 |
| 19/02 18h34 | Tri rapide | 3 |
![]() | Trillian - Trillian est un des clients de messagerie instantanée les plus aboutis. Il est compatible avec AIM®, MSN®, ICQ®, Yahoo!®, et... | Catégorie: Messagerie instantanée Licence: Open Source |
![]() | Rapidos! - Un peu plus complet que iCarbon , Rapidos! permet aussi de transformer votre PC en photocopieuse, mais offre des... | Catégorie: Bureautique Licence: Freeware/gratuit |
![]() | Java Runtime Environment - Java Runtime Environment (JRE) installe la machine virtuelle Java, permettant de jouer en ligne, de discuter avec des... | Catégorie: Java Licence: Open Source |
![]() | Xenu's Link Sleuth - Xenu's Link Sleuth est un logiciel permettant de vérifier les liens brisés d'un site web. La vérification est effectuée... | Catégorie: Webmaster Licence: Freeware/gratuit |
![]() | HP Pavilion a6441.fr-m AMD | Catégorie: Ordinateur de bureau | 699.99 € Rue du Commerce |
![]() | AMD Phenom 8650 Triple-Core | Catégorie: Processeur | 114.99 € Surcouf |
![]() | AMD Phenom 8750 Triple-Core | Catégorie: Processeur | 139.95 € Rue du Commerce |
![]() | AMD Phenom 8450 Triple-Core | Catégorie: Processeur | 99.90 € SAB Megastore |