Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to Find Ratio of 'N' Numbers

Former Member
0 Kudos

Hi Friends,

I am facing one problem. I need to calculate Ratio of 'N' numbers. How can i achieve this.

Ex: if i am having 5 numbers as 5 10 15 20 25 then ratio will be 1:2:3:4:5.

Here no.of Numbers not constant. That is why we need to consider it as 'N' numbers.

For these 'N' numbers i need to find ratio.

Is there any function modules available for this calculation or else please give suggestions how i can achieve this.

Helpful answers will reward.

Thanks,

Srinivas.

1 REPLY 1

former_member181995
Active Contributor
0 Kudos

Sri,

Am sad to say you there is no standard function available for that.

but i can suggest you the way how can achieve this.

first pick the lowest value from all numbers and divide it to all numbers and result are your ratio.

than you need to concatenate to show these value as ratio:

here in your case 5 10 15 20 25 is divided by 5

then you will get 5 result.

concatenate result1 result2 result3 result4 result5 sepreated by ':' into ratio.

hope you got the track.

Amit.