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

- How to send a Header data through HTTP Request using curl [202 Views]
- Mumbai University Theoretical Computer Science (TCS) Semester 4 Important Notes Download [659 Views]
- Python Program to Check Armstrong number [380 Views]
- Pseudocode and Algorithm for Finding Factorial of a Number [3319 Views]
- How To Reset Autoincrement value of Column in MySQL [733 Views]

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