Ma boucle est censee continuer a inviter l'utilisateur a entrer une valeure entre 1 et 10000 jusqu'a ce que 0 est entree... ca a l'air simple mais j'ai essaye plusieurs logiques illogiques sans succes.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 while ( company_ID != 0 ) { printf("\n Enter ID of company to search for (0 to quit) : "); scanf("%d", &company_ID); companyP = TreeFind(tree, company_ID); if (companyP == NULL){ if ( company_ID == 0 ) break; // breaking the condition if the KEY is 0 // since 0 is our charcater to quit the prog fprintf(stderr, "\nError! Company ID \"%d\" not found.\n", company_ID); }
Partager