problème d'exécution sous linux
voilà mon programme mais j'ai un problème de l'exécution; il m'affiche sur le consol , undefine refurence to floor et ceil:bug: :bug: :bug:
Code:
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
| #include<stdio.h>
#include <stdlib.h>
#include<math.h>
double Arrondit( double x)
{
if (0<=x)
{
return floor(x+0.5);
}
else
{
return ceil(x-0.5);
}
}
main() {
double Arrondit( double x);
double nbre ;
printf("donne ton nbre\n");
scanf("%lf",&nbre);
printf("PT de x = %f\n", Arrondit( nbre) );
} |
merci pour votre aide.