codinasion-archive / codinasion-monorepo

Community Monorepo
https://codinasion.org
MIT License
52 stars 170 forks source link

[Program]: Find power of a number by recursion #438

Open harshraj8843 opened 1 year ago

harshraj8843 commented 1 year ago

Description

Write a program to find power of a number by recursion

Power of a number is calculated by multiplying the number by itself for the given number of times. For example, 2^3 = 2 2 2 = 8.

Power of a number can be calculated by recursion. The formula is:

x^n = x * x^{n-1}
Input  : 2 3
Output : 8

Tracking Issues

pradeepch2107 commented 8 months ago

!assign