première fonction lirechoix et modif du .h

master
Roxane ROSSETTO 2 years ago
parent 4211ebe6f9
commit a1efb6b17f

@ -4,5 +4,16 @@
#include "commun.h" #include "commun.h"
Choix lirechx (void){
Choix chx;
printf("Saisir le choix de la ville\n");
fgets(chx.ville, 20, stdin);
chx.ville[strlen(chx.ville)-1]= '\0';
printf("Saisir le choix du departement d'étude\n");
fgets(chx.dptmt, 20, stdin);
chx.dptmt[strlen(chx.dptmt)-1]= '\0';
}

@ -8,6 +8,18 @@
Brief : Brief :
*/ */
typedef struct liste {
char ville[20];
char dptmt[20];
int dec;
int valid;
struct liste * suivant;
}Choix;
typedef struct { typedef struct {
int nEtu; int nEtu;
char nom[20]; char nom[20];
@ -17,14 +29,9 @@ typedef struct {
float moyen; float moyen;
float moyspe; float moyspe;
int nbchx; int nbchx;
Choix * lchx;
}Candidat; }Candidat;
typedef struct {
char ville[20];
char dptmt[20];
int dec;
int valid;
}Choix;

Loading…
Cancel
Save