我想提醒零 [英] i want to get reminder zero
本文介绍了我想提醒零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
i想要提醒''0''当时有两个数字
示例''18 / 12''
i得到提醒''6''
Hi all,
i want to get reminder ''0'' at the time devide two numbers
Example ''18/12''
i am getting reminder ''6''
推荐答案
不,你没有得到你想要什么;你得到了算术给你的东西。这样做:
No, you are not getting what you want; you are getting what arithmetic gives you. Do this:
int a = 18 / 12;
int b = 18 % 12;
double c = 18d / 12d;
如果你不想得到什么,你需要控制自己,而不是代码。需要解释你得到了什么?
这篇关于我想提醒零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文