Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is division in C language?
What is division in C language?
There are two "/"divisor operators and "%"remainder operators related to division in C language.

Divisibility is quotient and remainder is remainder, which is the most essential difference between them. It should be noted that the% remainder operator in C language can only operate integer data objects.

If two integer variables are divided, such as 10/3, the result is 3 instead of 3.3333; Another example is 10/4, and its result in C is 2, not 2.5. That is to say, if the result of integer variable division is decimal from a mathematical point of view, whether it can be rounded or not, C will discard the part after the decimal point.

Other calculation functions in c language.

If ch is a number ('0'-'9'), Int isdigit(int ch) returns a non-zero value, otherwise it returns 0.

If ch is a printable character (excluding spaces) (0x2 1-0x7E), Int isgraph(int ch) returns a non-zero value, otherwise it returns 0.

If ch is lowercase ('a'-'z'), Int islower(int ch) returns a non-zero value, otherwise it returns 0.

Double fabs(double x) returns the absolute value of the double-precision parameter x.

Long labs(long n) returns the absolute value of the long integer parameter n.

Double e xp(double x) returns the value of the exponential function ex.