forked from menault/2026_TD1_DEV51_Qualite_Algo
vérification de la première lettre sur chercher_mot
This commit is contained in:
+1
-1
@@ -238,7 +238,7 @@ int est_mot_vide(const char *mot)
|
|||||||
int chercher_mot(Entree *table, int nb_entrees, const char *mot)
|
int chercher_mot(Entree *table, int nb_entrees, const char *mot)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < nb_entrees; i++) {
|
for (int i = 0; i < nb_entrees; i++) {
|
||||||
if (egales(table[i].mot, mot))
|
if (table[i].mot[0] == mot[0] && egales(table[i].mot, mot))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user