C cross:在 C# 中交叉乘法(crossmultiplication)

关于C cross的问题,在crossmultiplication中经常遇到, 我有两个场景,我必须找到基于参数的结果(通过交叉乘法)。

我有两个场景,我必须找到基于参数的结果(通过交叉乘法)。

例如

场景-1:

int previousConceptCount = 100
int currentConceptCount = 20
int previousTime = 10
int currentTime = ?
Que: If 100 concepts take 10 mins to complete than how much time 20 concepts will take?
Ans: 
currentTime = (currentConceptCount * previousTime) / previousConceptCount //Works fine
//Mathematical calculation which I've added in code.  
  100     10
 ----- = -----  ==> x = (20(currentConceptCount) * 10(previousTime)) / 100(previousConceptCount)
  20       x  

场景-2:

int previousConceptCount = 10
int currentConceptCount = 100
int previousDocumentCount = 100
int currentDocumentCount = 100
int previousTime = 10
int currentTime = ?
    Que: If 10 concepts with 100 documents take 10 mins than how much time 100 concepts with 100 documents will take?
Ans: 
    currentTime = ?

在这种情况下如何计算currentTime。我总是有conceptCounts(both previous and current)documentCounts(both previous and current),并在此基础上找到时间。我不知道需要什么数学公式,或者让我这样说,我不知道在这种情况下如何计算。

有什么建议吗?

0

您只需要将您的概念乘以您的文档:

(20(currentConceptCount*currentDocumentCount) * 10(previousTime)) / 100(previousConceptCount*previousDocumentCount)

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(241)
C语言开发环境是什么:TIBCOBusinessWorks的开发环境是什么
上一篇
C 8 c 8:C# 8开关表达式(switch expression)
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(41条)