How to find Power of a number in C: - In this program we will calculate the power of a number using C programming. We want to calculate the power of any given number so you need to multiply that particular number power of time. Ex:- Let suppose number is 2 4 so we need to multiply with 4 times of 2. That is 2*2*2*2=16. ALGORITHMS:- Step 1 – Enter the base number, the number in which you just want to find the power of the number. Step 2 – Enter the exponential, the power of the number. Step 3 – Initialize while loop, while the exponential is not equal to zero. (i) do temp*number and store it in the temp. (ii) now reduce the exponential with -1. Here you got the power of the number. Step 4 – Now print the temp variable. Step 5- Stop. CODE: - #include <stdio.h> int ...
In this blog, many programs are written in the c language. This blog helps to increase our knowledge