How to operate division in c language
The division operation in c language uses the "/" symbol when calculating the result of arithmetic expression in C language , need to pay attention to the data type conversion of the operand during the calculation process.
Operations are performed on data and variables of the same data type, and the results maintain the original data type.
When operations are performed on data and variables of different data types, the result is a data type with high precision.
For example: the result of 1/2 is 0
The result of 1.0/2 is 0.5
Recommended learning: c language video tutorial
The above is the detailed content of How to operate division in c language. For more information, please follow other related articles on the PHP Chinese website!