Révision 203
Ajouté par thcoulaud il y a presque 4 ans
branch/coulaud/sp4a12/main.c | ||
---|---|---|
}
|
||
return (res);
|
||
}
|
||
int decode_nombre(char a[],int b)
|
||
|
||
int decode_nombre(char a[],int b)
|
||
{
|
||
int i=0,res=0;
|
||
for (i=0;i<b;i++)
|
||
... | ... | |
return (res);
|
||
}
|
||
|
||
int conv_char_to_float(char a[])
|
||
{
|
||
double res = atof(a);
|
||
printf("%lf\n", res);
|
||
return 0;
|
||
}
|
||
|
||
|
||
|
||
|
||
//Fonction ? modifier !!!!!
|
||
void traitement(char * trame)
|
||
{
|
||
... | ... | |
printf("Erreur test unitaire decode_nombre.\n");
|
||
exit(-1);
|
||
}
|
||
if (conv_char_to_float("153")!=153,000000){
|
||
printf("Erreur test unitaire conv_char_to_float.\n");
|
||
exit(-1);
|
||
}
|
||
|
||
}
|
||
|
||
|
||
|
||
// Ne pas modifier cette fonction
|
||
int main(int argc,char ** argv)
|
||
{
|
Formats disponibles : Unified diff
Question 9: Réalisation de la fonction de conversion en float