Hi everyone
I was wondering if anyone can help me with this.
I have a field called AFM which value is always 9 digits length.
I want to
1st : to reverse the order of the numbers
2nd: to multiply each value
3rd : to sum the muliplication
4th : to divide the sum
5th : to do a check to the division
an example is like this
AFM = 012345678
1st:8
2nd : 8*0=0
1st:7
2nd:7*2=14
1st:6
2nd:6*4=24
1st:5
2nd 5*8=40
1st:4
2nd:4*16=64
1st:3
2nd:3*32=96
1st:2
2nd:2*64=128
1st:1
2nd:1*128=128
1st:0
2nd:0*256=0
3rd :=Sum(0+14+24+40+64+96+128+128+0)=494
4th :494/11=44.90909
5th:44.90909*11=494
6th: If(5th<=4th);If(3rd-5th)=1stMyltiplyNo Then Correct else wrong)
Can anyone help me out?
Kind regards
John
I was wondering if anyone can help me with this.
I have a field called AFM which value is always 9 digits length.
I want to
1st : to reverse the order of the numbers
2nd: to multiply each value
3rd : to sum the muliplication
4th : to divide the sum
5th : to do a check to the division
an example is like this
AFM = 012345678
1st:8
2nd : 8*0=0
1st:7
2nd:7*2=14
1st:6
2nd:6*4=24
1st:5
2nd 5*8=40
1st:4
2nd:4*16=64
1st:3
2nd:3*32=96
1st:2
2nd:2*64=128
1st:1
2nd:1*128=128
1st:0
2nd:0*256=0
3rd :=Sum(0+14+24+40+64+96+128+128+0)=494
4th :494/11=44.90909
5th:44.90909*11=494
6th: If(5th<=4th);If(3rd-5th)=1stMyltiplyNo Then Correct else wrong)
Can anyone help me out?
Kind regards
John