ahmed sami

ahmed sami

  • NA
  • 64
  • 198k

Write a method IntegerPower( base, exponent )

Dec 10 2012 5:17 PM
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.

Answers (1)