
January 6th, 2011, 02:54 PM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 2
Time spent in forums: 32 m 57 sec
Reputation Power: 0
|
|
|
[Assembly x86] Help with an algorythm.
Code:
START
N(int)=0
i(int)=0
V[N]
even=0
odd=0
input N
do
input V[i]
i=i+1
while i<N
i=0
do
if i%2=0
then V[i]=V[i]+1
else
V[i]=V[i]^2
i=i+1
while i<N
i=0
do
if V[i] is even
then even=even+1
else odd=odd+1
i=i+1
while i<N
output pair
output odd
END
I need desperate help. I would pay to get this done. And don't get me wrong. If our teacher actually teached us the knowledge to do it, i'd try by myself. I never stand back from a problem as a matter of fact. But I just don't have any damn clue on how to do this. If someone can do the coding for me and paste it somewhere, it'd be eternally, ETERNALLY appreciated.
Thanks in advance even for reading this.
PS: Using TASM assembler.
|