Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PowerCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public static void main(String[] args) {
System.out.println("The power of " + base + " raised to" + exponent + " is " +power );
}

private static double calculatePower(double base, double exponent) {
private static double calculatePower(double base, double exp) {
double result = 1;
for (int i = 0; i < exponent; i++) {
for (int i = 0; i < exp; i++) {
result *= base;
}
return result;
Expand Down