Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For 4 - 5 , convert the C code to equivalent MARIE code. To reference numbers like 1 ( for instance when doing x +

For 4-5, convert the C code to equivalent MARIE code. To reference numbers like 1(for instance
when doing x++), you can either use #1 or assume the variable one is storing 1.
4. x=0;
scanf(%d, &y); // get y from the user
while(y>0){// loop y times (count downward from y to 0
scanf(%d, &z); // get z from the user
if(y==z) x++; // count if input is equal to current y (x is our counter)
y--;
}
printf(%d, x); // output the count
5. if(x>=y&&x<=z) x++; // assume x, y, z are already loaded with values
else if(y!=z) y++;
else z++;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

What is job rotation ?

Answered: 1 week ago

Question

Understand how to design effective service guarantees.

Answered: 1 week ago

Question

Know when firms should not offer service guarantees.

Answered: 1 week ago