24 percent so far so keep working at that goal
Dear ,you should ask it on stackoverflow and geekforgeelks , not here
Answer:
Explanation:
The following code is written in Java. It creates the raiseToPower method that takes in two int parameters. It then uses recursion to calculate the value of the first parameter raised to the power of the second parameter. Three test cases have been provided in the main method of the program and the output can be seen in the attached image below.
class Brainly {
public static void main(String[] args) {
System.out.println("Base 5, Exponent 3: " + raiseToPower(5,3));
System.out.println("Base 2, Exponent 7: " + raiseToPower(2,7));
System.out.println("Base 5, Exponent 9: " + raiseToPower(5,9));
}
public static int raiseToPower(int base, int exponent) {
if (exponent == 0) {
return 1;
} else if (exponent == 1) {
return base;
} else {
return (base * raiseToPower(base, exponent-1));
}
}
}
Answer:
This question is imcomplete, here is the complete question
Edison wants to purchase a new computer and go to the Caribbean for spring break. The computer is priced at $1,299, and the vacation is priced at $750. He has only $1,537 in his checking account, so he cannot afford to purchase both. After much thought, Edison buys the computer and writes a check for $1,299. Identify what role money plays in each of the following parts of the story. Hint: Select each role only once. Role of Money Medium of Exchange Unit of Account Store of Value Edison can easily determine that the price of the computer is more than the price of the vacation. Edison has $1,537 in his checking account. Edison writes a check for $1,299.
Identify what role money plays in each of the following parts of the story.
Explanation:
Brian can effortlessly determine and conclude that the cost of the computer is more than that of the price of the vacation.= Unit of Account
Brian has a total amount of $1,537 in his checking account.= Store of value
Brian then writes a check for $1,299.= Medium of Exchange