Logo 
Search:

C++ Programming Article

Submit Article
Comments on Write a function power() to raise a number m to a power n
Category: C++ Programming (Beginners)    Author: Easy Tutor

Write a function power() to raise a number m to a power n. The function takes a double value for m and int value for n and returns the result correctly. Use a default value of 2 for n to make the function to calculate squares when this argument is omitted. Write a main that gets the values of m and n from the user to test the function.


Pruthvi Bharadwaj
Pruthvi Bharadwaj from United StatesSep 01
did not understand the function part double power(double m,int n)...i am a begginer...kindly help



Please enter your Comment
  • Comment should be atleast 15 Characters.
  • Please put code inside [Code] your code [/Code].