From a5955171bf9c365f184ce801438713c97d7e073b Mon Sep 17 00:00:00 2001 From: Lola CHALMIN Date: Tue, 13 Dec 2022 15:55:24 +0100 Subject: [PATCH] lirecandidat --- commun.c | 20 +++++++++++++++++++- commun.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/commun.c b/commun.c index e6d90a1..229e21c 100644 --- a/commun.c +++ b/commun.c @@ -4,5 +4,23 @@ #include "commun.h" - +Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier +{ + printf("Numéro de candidat :\n"); + scanf("%d", &nEtu); + printf("Nom du candidat :\n"); + fgets(); + printf("Prénom du candidat :\n"); + fgets(); + printf("Moyenne de maths :\n"); + scanf("%f", &moymat); + printf("Moyenne de français :\n"); + scanf("%f", &moyfr); + printf("Moyenne d'anglais :\n"); + scanf("%f", &moyen); + printf("Moyenne de spécialité au choix :\n"); + scanf("%f", &moyspe); + printf("Nombre de choix :\n"); + scanf("%d", nbchx); +} diff --git a/commun.h b/commun.h index 2cba41a..9bc314f 100644 --- a/commun.h +++ b/commun.h @@ -28,3 +28,4 @@ typedef struct { +Candidat lireCandidat(void); \ No newline at end of file