Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77ac4823f1 |
@@ -16,6 +16,6 @@ public static class PriceCalculator
|
|||||||
throw new ArgumentOutOfRangeException(nameof(discountPercent), "A discount is between 0 and 100 percent.");
|
throw new ArgumentOutOfRangeException(nameof(discountPercent), "A discount is between 0 and 100 percent.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return price - discountPercent;
|
return price * (100m - discountPercent) / 100m;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user