Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
JenyBerezhna committed Jan 22, 2025
1 parent 43d65f3 commit d9da945
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/calculateRentalCost.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ function calculateRentalCost(days) {
}

if (days >= 3 && days < 7) {
return 100 + 40 * (days - 3);
return 40 * days - 20;
}

if (days >= 7) {
return 220 + (days - 6) * 10;
return 40 * days - 50;
}
}

Expand Down

0 comments on commit d9da945

Please sign in to comment.