Can you please help me with this Marie program? Thank you. Write a Marie program that will input two decimal integers, A and B, where A is not greater than 94 and B is not greater than A. Only one ‘Input’ statement allowed for each variable! Note that it is OK for A to equal B! Then ADD 4 to B giving S. If S is EVEN, do not change it. If S is ODD, add 1 to make it an even integer. Now subtract S from A giving N. Output A, B, S and N on separate lines. Repeat the loop until ‘0’ is entered for A, then Halt. (Do not ask for B, or do the calculations for S and N, or output anything if A=0!) Change the Input and Output mode of Marie to ‘Decimal’! --------------------------------------------------------------------------------- Example 1: Enter A = 18, B = 12 18 12 16 2 --------------------------------------------------------------------------------- Example 2: Enter A = 21, B = 15 21 15 20 1
Can you please help me with this Marie
Write a Marie program that will input two decimal integers, A and B, where A is not greater than 94 and B is not greater than A. Only one ‘Input’ statement allowed for each variable! Note that it is OK for A to equal B! Then ADD 4 to B giving S. If S is EVEN, do not change it. If S is ODD, add 1 to make it an even integer.
Now subtract S from A giving N. Output A, B, S and N on separate lines. Repeat the loop until ‘0’ is entered for A, then Halt. (Do not ask for B, or do the calculations for S and N, or output anything if A=0!)
Change the Input and Output mode of Marie to ‘Decimal’!
---------------------------------------------------------------------------------
Example 1: Enter A = 18, B = 12
18
12
16
2
---------------------------------------------------------------------------------
Example 2: Enter A = 21, B = 15
21
15
20
1
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images