55 lines
834 B
C
55 lines
834 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
struct maillon
|
|
{
|
|
int valeur;
|
|
struct maillon* suivant;
|
|
};
|
|
|
|
typedef struct maillon maillon;
|
|
|
|
maillon* debut(maillon* m, int v)
|
|
{
|
|
maillon* result = malloc(sizeof(maillon));
|
|
result->valeur = v;
|
|
result->suivant = m;
|
|
return result;
|
|
}
|
|
|
|
maillon* creerListe()
|
|
{
|
|
maillon* m = NULL;
|
|
unsigned short int val;
|
|
srand(time(NULL));
|
|
for(int i = 0; i<10; i++)
|
|
{
|
|
val = ;
|
|
m = debut(m,val);
|
|
}
|
|
return m;
|
|
}
|
|
|
|
maillon* AdditionListe(maillon* l1, maillon* l2)
|
|
{
|
|
maillon* m = NULL;
|
|
unsigned short int val;
|
|
srand(time(NULL));
|
|
for(int i = 0; i<10; i++)
|
|
{
|
|
val = ;
|
|
m = debut(m,val);
|
|
}
|
|
return m;
|
|
}
|
|
|
|
int main(int argc, char const *argv[])
|
|
{
|
|
if(argc<1){
|
|
printf("Il faut plus de valeur!");
|
|
}else{
|
|
maillon* premier = creerListe(argv[1]);
|
|
maillon* deuxième = creerListe(argv[2]);
|
|
}
|
|
return 0;
|
|
} |