DEV Community

Discussion on: Daily Coding Puzzles - Nov 11th - Nov 16th

Collapse
 
aspittel profile image
Ali Spittel

Java (!!) solution

public class Kata {
  public static int rentalCarCost(int d) {
    int total = d * 40;
    if(d >= 7)
      total -= 50;
    else if(d >= 3)
      total -= 20;
    return total;
  }
}