找出数百数万多少万,并有一个量 [英] Find out how many thousands and hundreds and tens are there in a amount

查看:128
本文介绍了找出数百数万多少万,并有一个量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP应用程序,并在金额栏是存在的。我需要找出多少万和数百和数是否有该金额

I am having a asp application and in that amount column is there. I need to find out how many thousands and hundreds and tens are there in that amount

例如

如果我有金额3660手段
1000年 - 3
100的 - 6
10的 - 6

if i am having amount as 3660 means 1000's - 3 100's - 6 10's - 6

这样的,我需要

任何机构可以帮助我

推荐答案

简单的答案是1000除以数量无论是1000年的金额数的商。然后划分与100的商数其余部分将是100的数目。然后再次划分为10余数,所述商将数10的

The simple answer is to divide the number by 1000 whatever is the quotient that is the number of 1000's in the amount. Then divide the remainder with the 100's the quotient will be the number of 100's. And then again divide the remainder with 10, the quotient will be the number of 10's

事情是这样的:

quotient = 3660 / 1000;     //This will give you 3
remainder = 3660 % 1000;    //This will give you 660

然后,

quotient1 = remainder/ 100;     //This will give you 6
remainder1 = remainder % 100;    //This will give you 60

最后

quotient2 = remainder1 / 10;     //This will give you 6 

这篇关于找出数百数万多少万,并有一个量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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