Why do the square of input decreases by one when using pow function? [duplicate]
问题 This question already has answers here : unusual output from pow (3 answers) pow() function in C problems [duplicate] (1 answer) Why the result of pow(10,2) 99 instead of 100? [duplicate] (1 answer) What's wrong with long? Why is subtracting 1 automatically? (1 answer) Closed last month . Here is a simple C program, which accepts a number from the user and results it's square. #include <stdio.h> #include <math.h> int main() { int number; int result; printf("\nEnter the number\n"); scanf("%d",