Such as: doublenum1= 6;
double num 2 = 4;
Double precision result = num1/num2;
-
When the decimal number is 0:
int num 1 = 6;
int num 2 = 4;
int result = num 1/num 2; (or doubleresult = num1/num2; )
The reason is that num 1 and num2 are integers, and the number obtained after two integer operations is an integer (for example, 1). If a value is assigned to a floating-point variable, just add .0 after the integer (for example, 1.0).
With the continuous improvement of property management level, the community has also formulated relevant regulations. Here I'd like to introduce s