首页 > 文档 > / (divide) 除
2017
07-21

/ (divide) 除

名称:/ (divide)

 

例子:

int g = 50 / 5;  // Assigns 10 to ‘g’
int h = g / 5;   // Assigns 2 to ‘h’

 

描述:

Divides the value of the first parameter by the value of the second parameter. The answer to the equation 20 / 4 is 5. The number 20 is the sum of four occurences of the number 5. As an equation we see that 5 + 5 + 5 + 5 = 20.

将第一个参数的值除以第二个参数的值。 方程20/4的答案为5。数字20是数字5的四次累加之和。如方程:5 + 5 + 5 + 5 = 20。

 

语法:

value1 / value2

 

参数:

value1 int or float
value2 int or float, but not zero (it is not possible divide by zero)   非零

 

相关:

* (multiply)
% (modulo)



最后编辑:
作者:Hewes
这个作者貌似有点懒,什么都没有留下。

/ (divide) 除》有 2 条评论

  1. Pingback 引用通告: * (multiply) 乘 | Processing编程艺术

  2. Pingback 引用通告: % (modulo) 模数 | Processing编程艺术

留下一个回复

你的email不会被公开。