Home > Backend Development > C#.Net Tutorial > How to operate division in c language

How to operate division in c language

angryTom
Release: 2020-02-20 13:58:52
Original
21879 people have browsed it

How to operate division in c language

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template