Marie Programs

Marie Programs

Write a MARIE subroutine that will multiply two numbers by using repeated addition. For example, to multiply 2 x 8, the program would add 8 to itself twice (if the larger of the two numbers is chosen to be added to itself, the subroutine will run more quickly). Then, write a MARIE program to raise an integer to a given power, using the subroutine.

Marie Programs

 

marie program 2 Write a MARIE program to sum the numbers 1 + 2 + 3 + 4 + … + N, where the user enters N.

marie program 3 Write a MARIE program that will sum numbers as the user enters them, which prints the running sum and the final sum. The user should enter a zero to terminate the program.

Is this the question you were looking for? If so, place your order here to get started!