各位兄台帮帮忙,如何求41向上取整等于50呢? 谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 进到十位int in = 41 , out;out = in/10;out++;out *= 10;或者只进到最高位int in = 4321 , out ,count=0;out = in;while(out%10!=0){ out/=10; count++;}out++;for(;count>0;count--){ out*=10;} 谢谢各位的解答,不过我想明白了,我做一个手机测量心率,本来要设置一个最大值呢,我老大说让我按照上面举的例子做呢,但是现在我这么想的,只要出现的值大于规定的那个值,便给它+10,这样的话,折线图也就不会显示不全的了。java code: yMax=70; if(y>yMax){ yMax+=10; renderer.setYAxisMax(yMax); }我就这么简单的判断了下。 int a = 41;int b = a % 10 == 0 ? a : (a / 10 + 1) * 10; 求一篇介绍Android应用软件开发的英文文献 android asp.net webservice 之间上传大文件:比如视频有谁知道怎么做吗 外包的项目怎么保障用户名和密码的安全性 webview 怎么设置用cmwap联网 高手请进 用android的模拟器下载的东西存在哪里 怎么修改导入到虚拟机中的文件权限 ViewPager 问题,急 大家有没有什么比较好的android学习视频教程啊(最好是在线观看) 如果在static中使用alertdialog 求大大们推荐安卓API在线查阅的网站! 对话框 可以旋转吗 关于继承BaseAdapter
out = in/10;
out++;
out *= 10;
或者只进到最高位int in = 4321 , out ,count=0;
out = in;
while(out%10!=0){
out/=10;
count++;
}
out++;
for(;count>0;count--){
out*=10;
}
java code:
yMax=70;
if(y>yMax){
yMax+=10;
renderer.setYAxisMax(yMax);
}
我就这么简单的判断了下。
int b = a % 10 == 0 ? a : (a / 10 + 1) * 10;