recursive function power

recursive function power - is an integer greater than or...

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

View Full Document Right Arrow Icon
Write a recursive function power(base, exponent) that, when invoked, returns base exponent For example: power(3,4) = 3*3*3*3. Assume that exponent
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is an integer greater than or equal to 1. Hint : The recursion step uses the relationship: base exponent = base * base exponent - 1...
View Full Document

This note was uploaded on 01/27/2010 for the course DS csc 270 taught by Professor Dr.m.g during the Spring '10 term at Notre Dame University-Louaize.

Ask a homework question - tutors are online