Write a method IntegerPower( base, exponent ) that returns the value of base^exponent ..
For example, IntegerPower( 3, 4 ) = 3 * 3 * 3 * 3. Assume that exponent is a positive, nonzero integer, and base is an integer. Method IntegerPower should use for or while to control the calculation. Do not use any Math library methods. Incorporate this method into a Win- dows application that reads integer values from TextBoxes for base and exponent from the user and performs the calculation with the IntegerPower method.
Loading

VulpesPosted Dec 10, 2012, 6:29 PM
Note that 'base' is a keyword in C# so I've used 'b' and 'e' as the parameter names rather than 'base' and 'exponent'.