(63 Views)

In this article, we will write an algorithm and flowchart for calculating X to the power of Y.

In the above algorithm,

- We first define variable pow and i and Initialize pow= 1 and i= 1.
- Then we read the base value and power value, then a loop is started until i reaches the value of Y.
- Inside the loop a variable pow is used to store the power value by reccursively multiplying the base value with pow, and then value of i is incremented.
- Then, we return value stored in pow.

0 UpvotesUpvote |
0 DownvotesDownvote |

- Best Book for Advanced PHP User [867 Views]
- Check if A Number is a Composite number or Not in C++ [147 Views]
- What can be done with Augmented Reality [446 Views]
- How to import data from a web service to database by SSIS package [328 Views]
- How to Import an Unity package or Asset into Unity3D [316 Views]

- Knuth-Morris-Pratt (KMP) Substring Search Algorithm with Java Example [9705 Views]
- Pseudocode and Algorithm to find whether number is Armstrong Number or Not [8727 Views]
- How To Win Ludo King Game Every Time [8499 Views]
- error: Multiple commands produce error in Xcode 10 [5374 Views]
- FlowChart and Pseudocode to find Whether a Number is Even or Odd [4605 Views]