• Create Account

### #Actualmr_malee

Posted 12 August 2014 - 07:33 PM

Say I wanted to get the inverse of that function. Given these numbers:

5, 10, 20, 40, 80, 160

how could I produce:

1, 2, 3, 4, 5, 6

again, I only know how to do this using loops:

int n = 1;
int value = 80;

while (value > 5) {

value -= value / 2;
n++;
}

return n;


### #1mr_malee

Posted 12 August 2014 - 07:22 PM

Say I wanted to get the inverse of that function. Given these numbers:

5, 10, 20, 40, 80, 160

how could I produce:

1, 2, 3, 4, 5, 6

PARTNERS