Following the Marie Coding Rules, write a single Marie Subroutine called ‘MPY’ that will multiply two positive variables: MP1 and MP2 and place the result in PROD1. One or both of the Input variables may be negative and MP2 could be zero!! Write a Marie program to input the two variables, determine their sign, force them to be positive and keep track of how many variables are negative. If only one variable is negative, the result is negative! Then place the variables in the subroutines input variables. ‘Call’ the subroutine, get the result, and Display the three variables. Halt the program only when MP1 is zero, and do not ask for MP2! Upload your program named: Prog5.max to the Assignment dropbox. Sample Output: (‘Decimal’ Marie setting for Input and Output!) 12 10 120
Following the Marie Coding Rules, write a single Marie Subroutine
called ‘MPY’ that will multiply two positive variables: MP1 and MP2
and place the result in PROD1. One or both of the Input variables
may be negative and MP2 could be zero!! Write a Marie
force them to be positive and keep track of how many variables are
negative. If only one variable is negative, the result is negative!
Then place the variables in the subroutines input variables. ‘Call’ the
subroutine, get the result, and Display the three variables. Halt the
program only when MP1 is zero, and do not ask for MP2!
Upload your program named: Prog5.max to the Assignment dropbox.
Sample Output: (‘Decimal’ Marie setting for Input and Output!)
12
10
120
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images