在定义了正分数后可以定义有正分数参加的数的加法和乘法,并可以验证运算律。
After defined positive fraction Numbers, we might define addition and multiplication for positive fraction Numbers, and then we can also verify operation laws.
你需要为每一种运算设置单独的动作,或者说方法(每个框架的叫法不一样),而且还要用到框架中的表单验证功能(如果框架提供了这一功能的话)。
You should make each different arithmetic function its own action/method/whatevertheframeworkcallsit and you should use the frameworks input validation for the form values (if it has one).
为了验证该函数确实按照所设计的方式工作,我们需要再次将每个整型数字转换成二进制数字,对每一个位执行EXLUSIVE OR运算,然后将结果还原成integer。
To verify that the function indeed works as designed, we, again, need to convert each integer to BINARY, perform EXLUSIVE or for each bit, and then convert the result back to integer.
应用推荐