This is just really confusing me. The 10 should get coerced to 10.0 in the same way regardless of whether or not it's a variable, right?
int n = 10;
printf("%d\n", (int) pow(n, 2)); // Prints 99
printf("%d\n", (int) pow(10, 2)); // Prints 100
This is just really confusing me. The 10 should get coerced to 10.0 in the same way regardless of whether or not it's a variable, right?
int n = 10;
printf("%d\n", (int) pow(n, 2)); // Prints 99
printf("%d\n", (int) pow(10, 2)); // Prints 100