Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0d9ab0e

Browse files
fixed the bug
1 parent 4b087ac commit 0d9ab0e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎Level-02/Task-13/src/Main.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static int getFactorial(int n) {
3939
if (n <= 1) {
4040
return 1;
4141
} else {
42-
return n * factorial(n - 1);
42+
return n * getFactorial(n - 1);
4343
}
4444
}
4545

@@ -49,6 +49,7 @@ public static void calculateResult(double originalPrice) {
4949
double discountedPrice = originalPrice - discountAmount;
5050
double tax = 0.05;
5151
double totalTax = discountedPrice * tax;
52-
System.out.println("For double " + originalPrice + ": Total cost after discount = " + discountedPrice + ", Total tax = " + totalTax);
52+
System.out.println("For double " + originalPrice + ": Total cost after discount = " + discountedPrice
53+
+ ", Total tax = " + totalTax);
5354
}
5455
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /