I starting programming with language C and I have problem with using pow function.
I wrote this code
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double result = 3 / 2 + 12 - (pow(5, 3) - 2)/6;
double result2 = 3 / 2 + 12 - (5*5*5 - 2)/6;
printf("%g %g", result, result2);
return 0;
}
result has value -7.5, result 2 has value -7. I dont have any idea why its not equal.