Hi I'm learning C and now I want to use certain maths functions such as square root. But I can't make it work. It just send me back the number I write.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double resultat = 0, nombre1 = 100;
printf("Square root : \n");
scanf("%lf", &nombre1);
resultat = sqrt(nombre1);
printf("%lf", nombre1);
return 0;
}
If I wirte square root 100 it just send me back 100, 49 sends back 49 and so on.
How can I make it work ? What about pow function ? It doesn't seem to work either.
Thanks a lot !