|
-
Apr 7th, 2006, 12:36 AM
#1
Thread Starter
Fanatic Member
Invert percentages
For some reason I'm having a brain freeze on this. I want to invert percentages. For example:
a = 1 : 17%
b = 2 : 33%
c = 3: 50%
Calculation is simply n/(a+b+c). But I want it inverted such that
a = 1 : 50%
b = 2 : 33%
c = 3: 17%
What's the formula I'm looking for?
-
Apr 7th, 2006, 01:35 AM
#2
Re: Invert percentages
Don't understand the question. How do you get a, b, c?
-
Apr 8th, 2006, 12:28 AM
#3
Lively Member
Re: Invert percentages
You could do (4 - N) / (a + b + c)
N 4-N 4-N / (a+b+c)
1 3 50%
2 2 33%
3 1 17%
??
Tom
-
Apr 8th, 2006, 05:42 AM
#4
Re: Invert percentages
Put the objects in an array, then use Array.Reverse (or whatever Array.Reverse would be in VB6, if they have anything like that) ... of course, not sure why this is in the maths forum, unless I am missing something...
-
Apr 15th, 2006, 08:08 AM
#5
Lively Member
Re: Invert percentages
This seems a bit vague but anyways,
a=100-b-a;
c=100-a-b;//new value of a.
b=100-c-a.//new value of c and a.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|