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
|
void creerliste(int N)
{
int i,j=1,continu;
noeud* graphe;
noeud* suiv;
char noun;
graphe =(noeud*)malloc( N * sizeof(noeud*));
for (i=0; i<N; i++)
{ graphe[i]=initialisation();
printf("Donner le nom du premier noeud\n");
scanf("%c",noun);
graphe[i]=ajoutnoeud(graphe[i],noun);
printf("Pour entrer les successeurs de: %c tapez 1, sinon tapez 0\n",graphe[i]->nom);
scanf("%d",continu);
if( continu == 1){
while(j != 0){
printf("Donner le nom du successeur de: %c ou taper 0 s'il n'existe aucun autre successeur\n",noun);
graphe[i]=ajoutnoeud(graphe[i],noun);
if(noun == 0)
j=0;
}
}
else ;
}
} |