You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
901 B
29 lines
901 B
void saisieEmployeNbreFormatrions(int *idEmp, int *nbForm)
|
|
{
|
|
FILE *flot;
|
|
flot = fopen("donneesEmployes.txt", "r");
|
|
if(flot == NULL)
|
|
{
|
|
printf("Pb d'ouverture du fichier donneesEmployes.txt\n");
|
|
exit(1);
|
|
}
|
|
|
|
printf("Veuillez saisir votre identifiant :");
|
|
scanf("%d", idEmp);
|
|
printf("identifiant de l'employé : %d\n", idEmp);
|
|
while(*idEmp < 1000 || *idEmp > 9999)
|
|
{
|
|
printf("identifiant d'employé incorrect, il doit être à 4 chiffrres. Re-saisir : ");
|
|
scanf("%d", idEmp);
|
|
printf("%d\n", idEmp);
|
|
}
|
|
fscanf(flot, "%d%d", &idEmp, &nbForm);
|
|
printf("nombre de formations choisies : %d", nbForm);
|
|
while(*nbForm > 0 || *nbForm <= 10)
|
|
{
|
|
printf("nombre de formations incorrect, il doit être entre 0 et 10 compris. Re-saisir : ");
|
|
scanf("%d", &nbForm);
|
|
printf("%d\n", nbForm);
|
|
}
|
|
}1021 81010 2121010 2121010 212151010 2 12 16
|
|
1010 3 12 11 14 |