i'm really struggling with this pseudocode to convert it to MARIE
Input a number
Assign this number to x
if(x <y)
x = x + y;
z=z+w;
else
y=y-w;
Print the value of the accumulator.
x, Dec 0
y, Dec 2
z, Dec 5
w, Dec 1
i'm really struggling with this pseudocode to convert it to MARIE
Input a number
Assign this number to x
if(x <y)
x = x + y;
z=z+w;
else
y=y-w;
Print the value of the accumulator.
x, Dec 0
y, Dec 2
z, Dec 5
w, Dec 1
Jump to PostThis reads like a typical assignment so I'll only note that I would definitely use the JUMP ELSE somewhere in my solution.
Again, I can't provide code since that would be doing your homework.
This reads like a typical assignment so I'll only note that I would definitely use the JUMP ELSE somewhere in my solution.
Again, I can't provide code since that would be doing your homework.
is this correct
Load x
Subt y
Skipcond 800
Jump Else
If, Load x
Add y
Store x
Output x
Clear
Laod z
add w
store z
Output z
Else, Load y
subt w
store y
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.