Bonjour,
j'aimerai bien connaitre comment repartir un tableau de chaine de caractère et le comparer en utilisant strcmp

Code : Sélectionner tout - Visualiser dans une fenêtre à part
char unite[25][10]={"","un","deux","trois","quatre", "cinq", "six", "sept", "huit","neuf"};

...
en utilisant le boucle for: comment et ou initialiser i et jusqu'à ou?
et ce que cela est juste?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
for(i=unite[0];i>unite;i++)
if strcmp(l1,unite[i]
veuillez jeter un coup d'œil pour avoir un peut d'idée
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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<string.h>
#include<conio.h>
 
 main()
{
char l1[50],l2[50],l3[50],l4[50], lettre[256];
char *espace = " ";
char unite[25][10]={"","un","deux","trois","quatre", "cinq", "six", "sept", "huit","neuf"};
char dizaine[11][20]={"","","vignt","trente","quarante","cinquante","soixante","soixante-dix","quatre-vignt","quatre-vignt-dix"};
char centaine[5][9]={"cent","cents"};
int s,i;
strcpy(lettre,"");
printf("donner une chiffre literalement\n");
scanf("%s\n",&l1);
scanf("%s\n",&l2);
scanf("%s\n",&l3);
scanf("%s\n",&l4);
 
strcat(lettre,l1);
strcat(lettre,espace);
strcat(lettre,l2);
strcat(lettre,espace);
strcat(lettre,l3);
strcat(lettre,espace);
strcat(lettre,l4);
 
printf("%s\n",lettre);
 
for(i=unite[0];i>unite;i++)
if strcmp(l1,unite[i])//bien sur c pas encore complet
 
getch();
return 0;
}
si c faut comment elle devienne alors?
merci d'avance.