Assn5 - 2. (30 points) Implement the recursive function...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CDA 3101 Assignment 5 Due in class on Thursday, Oct. 12 Turn hardcopy in class, stapled, with your name and “CDA 3101 Assignment 5” clearly written on it. For programs, submit a printout with your hardcopy, in class. Also, submit the program for Problem 2 below electronically, via WebCT Assignment Tool. You must use the WebCT Assignment Tool to submit your code; you cannot submit your code using email. 1. (20 points) Problem 2.37 from the textbook.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2. (30 points) Implement the recursive function power() given below in the MIPS assembly language. int power(int x, int y) { int ret; if (y == 1) return x; ret = x * Power(x, y-1); return ret; } Also, write a short main function that i. prompts the user to enter the integers x and y ii. calls the power( ) function to compute x y iii. and prints the value returned by the power( ) function Test your program using PCSPIM....
View Full Document

This note was uploaded on 12/02/2009 for the course CDA 3101 taught by Professor Small during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online