function PowerCalculator(base,power)
    {
        var number = base;
        if(power == 1)
        return number;
        if(power == 0)
        return 1;
        for(var i=2;i<=power;i++)
        {
            number = number * base;
        }
        return number;
    }
4
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Taywin
0

hi, im new here, and i cannot find the topic for Writing a program to find the power of any given number that is basic enough,im a beginner, if anyone can help me or just giving me a link to an existing thread like this..i will appreciate it very much... :)

0

hi, im new here, and i cannot find the topic for Writing a program to find the power of any given number that is basic enough,im a beginner, if anyone can help me or just giving me a link to an existing thread like this..i will appreciate it very much...

Please create a new post instead of pulling an old thread.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.