诠释到十进制的转换 - 在指定位置插入小数点 [英] Int to Decimal Conversion - Insert decimal point at specified location

查看:117
本文介绍了诠释到十进制的转换 - 在指定位置插入小数点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下INT 7122960结果
我需要将其转换为71229.60



如何将INT转换为十进制的任何想法和?在正确的位置插入小数点


解决方案

  INT I = 7122960; 
十进制D =(十进制)I / 100;


I have the following int 7122960
I need to convert it to 71229.60

Any ideas on how to convert the int into a decimal and insert the decimal point in the correct location?

解决方案

int i = 7122960;
decimal d = (decimal)i / 100;

这篇关于诠释到十进制的转换 - 在指定位置插入小数点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆