TP5: feed all exercices code skeleton to Lindent
[Algorithmic_C.git] / TP5 / exo4 / liste_a_completer.c
diff --git a/TP5/exo4/liste_a_completer.c b/TP5/exo4/liste_a_completer.c
deleted file mode 100644 (file)
index b7494f0..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/********************************************************************/
-/*   Implantation d'une liste triee d'entiers                       */
-/********************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-
-typedef int element;
-
-typedef struct cellule {
-       element valeur;
-       struct cellule *suivant;
-} Cellule, *Liste;
-
-
-Liste ajouter_iter(element e, Liste L)
-{Cellule *pc, *p1=L, *p2=NULL;
-
- pc = (Cellule *)malloc(sizeof(Cellule)); 
- pc->valeur=e;
- pc->suivant=NULL;
- if (!L) /* liste vide */ return pc;
-
- while (p1 && (e >= p1->valeur))
-       {p2 = p1; 
-       p1 = p1->suivant;}
-       
- if (!p2) /* insertion en tete */ 
-       {pc->suivant = L; 
-       L=pc; }
- else /* insertion entre p2 et p1 */
-      {p2->suivant = pc; 
-       pc->suivant = p1; }
- return L;
-}
-
-
-int longueur_iter(Liste L)
-{
- return 0; /* ... */
-}
-
-
-int longueur_rec(Liste L)
-{
- /* ... */
-}
-
-
-void visualiser_iter(Liste L)
-{
- /* ... */
-}
-
-
-void visualiser_rec(Liste L)
-{
- /* ... */
-}
-
-
-int rechercher_iter(element e, Liste L)
-{ 
- /* ... */
-}
-
-
-Liste rechercher_rec(element e, Liste L)
-{ 
- /* ... */
-}
-
-
-Liste ajouter_rec(element e, Liste L)
-{
- /* ... */
-}
-
-
-Liste supprimer_iter(element e, Liste L)
-{
- /* ... */
-}
-
-Liste supprimer_rec(element e, Liste L)
-{
- /* ... */
-}
-
-
-Liste inverser_iter(Liste L)
-{
- /* ... */
-}
-
-
-Liste inverser_rec(Liste L)
-{
- /* ... */
-}
-
-
-/****************************************************************************/ 
-int main()
-{
- int x;
- Liste L=NULL;
- scanf("%d",&x);
- L=ajouter_iter(x,L);
- printf("longueur=%d\n",longueur_iter(L));
- visualiser_iter(L);
- /* ... */
-}
-/****************************************************************************/ 
-