c'est la merdasse

master
Roxane ROSSETTO 2 years ago
commit c97bbc3695

@ -30,18 +30,23 @@ Choix lirechx (void){
Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
{ {
Candidat c; Candidat c;
int nEtu,nbchx;
float moymat, moyfr, moyen, moyspe;
char nom[20], prenom[20];
printf("Numéro de candidat :\n"); printf("Numéro de candidat :\n");
scanf("%d", &c.nEtu); scanf("%d", &c.nEtu);
printf("Nom du candidat :\n"); printf("Nom du candidat :\n");
fgets(); fgets(c.nom, 20, stdin);
printf("Prénom du candidat :\n"); printf("Prénom du candidat :\n");
fgets(); fgets(c.prenom, 20, stdin);
printf("Moyenne de maths :\n"); printf("Moyenne de maths :\n");
scanf("%f", &c.moymat); scanf("%f", &c.moymat);
printf("Moyenne de français :\n"); printf("Moyenne de français :\n");
@ -53,8 +58,10 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
printf("Nombre de choix :\n"); printf("Nombre de choix :\n");
scanf("%d", &c.nbchx); scanf("%d", &c.nbchx);
scanf("%d", nbchx); scanf("%d", nbchx);
return c;
} }
<<<<<<< HEAD
@ -89,3 +96,12 @@ Choix * chargeChoix(Choix *tchoix, TAILLE, nbchx){
=======
void AffC(Candidat c)
{
printf("%d\n", c.nEtu);
printf("%s \n %s\n", c.nom, c.prenom);
printf("%.2f\t%.2f\t%.2f\t%.2f\n", c.moymat,c.moyfr, c.moyen, c.moyspe);
printf("%d\n", c.nbchx);
}
>>>>>>> refs/remotes/origin/master

@ -2,3 +2,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "commun.h" #include "commun.h"
int main(void)
{
Candidat c;
c = lireCandidat();
return 0;
}
Loading…
Cancel
Save