Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!