(614 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 |

- Check if A Number is a Composite number or Not in C++ [566 Views]
- Python program to Print Prime Number between 1 to n [696 Views]
- Javascript Program to Check whether Number is Prime or Not [1368 Views]
- What is Docker? [1930 Views]
- Can a where Clause be used along with a Truncate command [950 Views]

- How To Win Ludo King Game Every Time [25318 Views]
- Knuth-Morris-Pratt (KMP) Substring Search Algorithm with Java Example [23802 Views]
- Algorithm to find whether number is Armstrong Number or Not [23348 Views]
- Jio Phone hang on LOGO problem Solution - Hard Reset Jio Phone [16526 Views]
- FlowChart and Algorithm to find Whether a Number is Even or Odd [12710 Views]