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
| #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main(void) {
bool fini = false;
int company_ID;
while (!fini) {
printf("\n Enter ID of company to search for (0 to quit) : ");
scanf("%d", &company_ID);
/*
* Saisie de company_ID, à revoir sans doute
*/
/*
* Ce qui doit être fait pour toute valeur de company_ID
*/
puts("saisie OK");
if (company_ID == 0) {
/*
* Ce qui doit être fait pour company_ID == 0 (donc une fois)
*/
puts("saisie == 0");
fini = true;
}
else {
/*
* Ce qui doit être fait pour company_ID != 0
*/
puts("saisie != 0");
}
}
printf("Boucle finie, %d\n", company_ID);
return EXIT_SUCCESS;
} |
Partager