1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <windows.h>
#include <string.h>
int Tvaleur;
typedef struct Tmaillon{
Tvaleur valeur;
Tmaillon * suivant;
}Tmaillon;
Tmaillon *Tliste;
void nouveau_maillon(Tvaleur val)
{
Tmaillon* L;
L=malloc(2*sizeof(int));
*L.suivant=0;
*L.valeur=val;
return &L;
}
void insertion_fin(Tliste* liste, Tmaillon * maillon)
{
Tmaillon * curseur;
curseur = liste ;
while (curseur->suivant)(!= 0)
{
curseur=curseur-> suivant;
}
curseur-> suivant =maillon;
}
void afficher_liste(Tliste liste)
{
int cpt;
for(cpt=0;cpt=argc;cpt++)
{
printf(" %d....%d....%d...., *liste[cpt],(**liste).valeur,*liste[cpt+1]/n");
}
int main(int argc,char**argv)
{
int*n
int cpt;
for(cpt=0;cpt=argc;cpt++)
{
n=nouveau_maillon(argv[cpt]);
insertion_fin(@L,n);
afficher_liste(L);
}
} |
Partager