zoukankan
html css js c++ java
数字个位逢1~9进成整10,如91转成100;98转成100;
场景:
售票系统,VIP会员按折扣优惠,但折扣不同会产生零头,要求此类价格个位逢零头向上进位成整10。
解决办法:
/**/
///
<summary>
///
数字个位逢1~9进成整10,如91转成100;98转成100;
///
</summary>
///
<param name="strValue">
转换前参数
</param>
///
<returns></returns>
转换后结果
private
string
RoundEx(
string
strValue)
{
decimal
decValue
=
0
;
string
strResult
=
""
;
try
{
decValue
=
Convert.ToDecimal(strValue);
strResult
=
Convert.ToString(Math.Ceiling(decValue
/
10
)
*
10
);
}
catch
{
strResult
=
"
0.00
"
;
}
return
strResult;
}
查看全文
相关阅读:
《metasploit渗透测试魔鬼训练营》靶机演练之第五章实战案例KingView 6.53版本CVE-2011-0406漏洞
《metasploit渗透测试魔鬼训练营》学习笔记第五章--网络服务渗透攻击
《metasploit渗透测试魔鬼训练营》靶机演练之第五章实战案例Oracle数据库
《metasploit渗透测试魔鬼训练营》学习笔记第四章—web应用渗透
《metasploit渗透测试魔鬼训练营》学习笔记第三章----情报搜集
Kali-linux Arpspoof工具
Kali-linux攻击路由器
Kali-linux在树莓派上破解无线网络
Kali-linux使用Easy-Creds工具攻击无线网络
20155225 2016-2017-2 《Java程序设计》第五周学习总结
原文地址:https://www.cnblogs.com/spymaster/p/891355.html
最新文章
controller错误统一处理--------@ExceptionHandler
用POI读取具有任意合并单元的excel数据
js汉语转拼音(全拼、首字母、拼音首字母)
spring boot分布式技术,spring cloud,负载均衡,配置管理器
jqueryValidation使用
js将json字符串转化成json对象的方法
java 汉语转拼音(全拼,首字母)
double四舍五入,double四舍五入并转成string
HTTP Client工具类
Windows和Linux之间 rsync数据同步
热门文章
如何在Windows上挂载Linux系统分区
Windows端部署zabbix-agent
python--继承关系
Python之对象的永久保存模块---pickle
redis慢查询日志的配置和查看
zabbix实现微信告警配置
linux系统日志自动切割工具----logrotate
git版本控制工具基本用法讲解(转)
Windows系统安装nginx及配置
《metasploit渗透测试魔鬼训练营》靶机演练之第五章实战案例MS08-067漏洞
Copyright © 2011-2022 走看看