计算两个数字之间节省的百分比?

编程入门 行业动态 更新时间:2024-10-12 14:23:28
本文介绍了计算两个数字之间节省的百分比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有两个数字,第一个是原始价格,第二个是折扣价格.

I have two numbers, the first, is the original price, the second, is the discounted price.

我需要弄清楚用户以第二价格购买时可以节省多少百分比.

I need to work out what percentage a user saves if they purchase at the second price.

example 25, 10 = 60% 365, 165 = 55%

我不知道是计算它的公式.

What I dont know is the formula to calculate this.

推荐答案

我知道这已经很老了,但我认为这和任何放置它一样好.我在yahoo上找到了一篇很好的说明文章:

I know this is fairly old but I figured this was as good as any to put this. I found a post from yahoo with a good explanation:

Let's say you have two numbers, 40 and 30. 30/40*100 = 75. So 30 is 75% of 40. 40/30*100 = 133. So 40 is 133% of 30. The percentage increase from 30 to 40 is: (40-30)/30 * 100 = 33% The percentage decrease from 40 to 30 is: (40-30)/40 * 100 = 25%. These calculations hold true whatever your two numbers.

原始帖子

更多推荐

计算两个数字之间节省的百分比?

本文发布于:2023-11-29 11:35:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646280.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:百分比   节省   两个   数字

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!