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
|
void main(void)
{
int choix;
char Snom[20];
char Sfabricant[20];
char Sfonction[100];
float Sprix;
CreerListeVide();
do{
printf("----------------------------COMMANDES--------------------------\n");
printf("1 : Entrer un nouveau composant\n");
printf("2 : Afficher le composant\n");
printf("3 : Afficher tous les composants\n");
printf("4 : Sauvegarder la liste de composant dans un fichier texte\n");
printf("5 : Afficher tous les composants contenu dans le fichier texte\n");
printf("6 : QUITTER\n");
printf("--------------------------------------------------------------\n");
scanf("%d",&choix);
if(choix==1)
{
printf("Saisir Nom du composant\n");
fgets(Snom);
printf("Saisir Fabricant du composant\n");
fgets(Sfabricant);
printf("Saisir Fonction du composant\n");
fgets(Sfonction);
printf("Saisir Prix du composant\n");
scanf("%f",&Sprix);
InsertionEnAd(Snom,Sfabricant,Sfonction,Sprix,ter);
}
....
....
....
....
....
....
}while(choix!=6);
} |