Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

[x86 Assembly] Help with an algortyhm.

$
0
0
ok guys, I don't know who else to ask. I'm pretty much screwed if someone of you doesn't help me.

Let's get to the problem. I've had a problem to solve, I've made the algorythm, all cool. Problem is, there are some structures such as array and/or do/do..while cycles that weren't taught to us!

So this is the 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[/code]

Whoever can help me with this, I would appreciate it tons and even pay something for it. Please!

Thanks for reading.


Viewing all articles
Browse latest Browse all 152

Trending Articles