Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Q10-You are given two numbers n and p. You need to find n raised to the power p.
- Ans-static int Power(int n,int p)
- {
- int pow = 1;
- for (int i = 1; i <= p; i++) {
- pow *= n;
- }
- return pow;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement