Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Factorial problem of c language
Factorial problem of c language
This is because the data is beyond the storage type.

I think the number of bytes of plastic surgery in your environment should be 4 bytes, so the maximum number that plastic surgery can represent is (2 3 1)- 1, which is a number of 10 bits starting from 2. If it is the factorial of 13, the result is beyond the range that plastic surgery can represent.

There are ~ ~1byte =8 bits, so the answer upstairs is obviously wrong ~ ~ 4 bytes =32 bits, and the highest bit is the sign bit, so the maximum data range that plastic can represent should be the negative power of 3 1 of 2.

In addition ~ ~ ~ uses the namespace std, which refers to the namespace instead of the header file. Namespaces are added in C++, but not in C language.