Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Formula

Name: sootn 2010-01-20 12:01

I'm writing a little program.. and I need to figure this out.
say that the user is inputing 4, then i want 3
if the user input's 6 i want 4
8->5
10->6
and so on.

Name: sootn 2010-01-20 12:07

I know, I'm stupid as hell.
I thought a bit too far.

Name: Anonymous 2010-01-20 12:59

if they are ints then -> (input / 2) + 1

Name: sootn 2010-01-20 13:02

I know, I got it in exactly the same moment that I posted :(
but thanks for trying to help

Name: Anonymous 2010-01-22 7:47

nope, nope, nope...that's not gonna work. :/

Name: Anonymous 2010-01-23 1:24

Name: Anonymous 2010-01-23 12:32

Alternatively you could create a sequence, the first figure in the sequence being 4, then second being 6 etc... And simply deduct the figure's sequence position from the figure.

So if the sequence position is z, we have...

z=y=x
1=4=3
2=6=4
3=8=5
4=10=6

z=2z+2=z+2

Don't change these.
Name: Email:
Entire Thread Thread List