Révision 74
Ajouté par beboucheix il y a environ 4 ans
branch/boucheix/sp4a12/main.c | ||
---|---|---|
res=(-1);
|
||
}
|
||
return (res);
|
||
}
|
||
int decode_nombre(char a[],int b)
|
||
{
|
||
int i=0,res=0;
|
||
for (i=0;i<b;i++)
|
||
{
|
||
res*=10;
|
||
res+=decode_int(a[i]);
|
||
}
|
||
return (res);
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//Fonction ? modifier !!!!!
|
||
void traitement(char * trame)
|
||
... | ... | |
printf("Erreur test unitaire decode_int3.\n");
|
||
exit(-1);
|
||
}
|
||
|
||
|
||
if (decode_nombre("12",2)!=12){
|
||
printf("Erreur test unitaire decode_nombre.\n");
|
||
exit(-1);
|
||
}
|
||
if (decode_nombre("586",3)!=586){
|
||
printf("Erreur test unitaire decode_nombre.\n");
|
||
exit(-1);
|
||
}
|
||
|
||
}
|
||
|
||
|
Formats disponibles : Unified diff
question8