allExponent: You are given a base value and an exponent value. You need to calculate the value of the base raised to the power of the exponent. You need to implement the allExponent method which takes the base value and the exponent value as input and returns the value of the base raised to the power of the exponent.
class Solution
{
float allExponent(int baseValue, int exponentValue)
{
float res = 1;
if(exponentValue >=0)
{
Exponent exp = new Exponent(baseValue, exponentValue);
res = (float)exp.positiveExponent();
}
else
{
// write your code here for negative exponentInput
Exponent exp = new Exponent(baseValue, exponentValue);
res = (float)exp.negativeExponent();
}
return res;
}
}Happy Learning – If you require any further information, feel free to contact me.
![[Solved] allExponent write your code here for negative exponentInput [Solved] allExponent write your code here for negative exponentInput](https://realcoder.techss24.com/wp-content/uploads/2022/11/Solved-allExponent-write-your-code-here-for-negative-exponentInput.png)
![[Solved] Possible ways to Propose CodeCrush by NewtonSchool](https://realcoder.techss24.com/wp-content/uploads/2023/02/Solved-Possible-ways-to-Propose-CodeCrush-by-NewtonSchool-300x169.png)
![Write a class ReorderArray with a public method reorder that takes one parameter arr of type int[] and returns the arr such that all even numbers in the array come to the front of the arr](https://realcoder.techss24.com/wp-content/uploads/2022/06/Write-a-class-ReorderArray-with-a-public-method-reorder-that-takes-one-parameter-arr-of-type-int-and-returns-the-arr-such-that-all-even-numbers-in-the-array-come-to-the-front-of-the-arr-300x200.png)
![[Solved] Write a function HackerRank Problem](https://realcoder.techss24.com/wp-content/uploads/2022/09/Solved-Write-a-function-HackerRank-Problem-300x200.png)