0
Write a program to calculate one number raised to the power other number using while and do while.
3 Antworten
+ 2
Please tag 'C-language' rather than 'usingc', the latter didn't come as clear about language context.
Share your code in progress so others can see where the problem is. Follow the below guide in case you didn't know how 👇
https://www.sololearn.com/post/75089/?ref=app
+ 2
Pls share your attempt if it is unsolved.
Complete loops lesson.
num1 = num1*num1;
run this in loop num2 times just. Then you get num1 to the power raised num2 times.
I think, Tags " c loop power " will help more for search bar.
+ 1
Thank you for updating the tags 🙏
Here's a bit of pseudo
Begin Function power( n, x ) returns int
Let ret = n
While --x not equal zero
Begin
Multiply ret by n
End
Return ret
End Function