#C8592. Taco Discount Calculator

    ID: 52591 Type: Default 1000ms 256MiB

Taco Discount Calculator

Taco Discount Calculator

Given the day of the week and the total price before discount, calculate the final price after applying a discount based on the following rules:

  • Monday: 10% discount.
  • Tuesday: No discount.
  • Wednesday: 15% discount if \(total\ price > 100\), otherwise no discount.
  • Thursday: 20% discount.
  • Friday: 5% discount if \(total\ price > 50\), otherwise no discount.
  • Saturday: 25% discount.
  • Sunday: No discount.

If an invalid day is entered, the program should handle the error appropriately by displaying an error message. The final price must be rounded to two decimal places.

inputFormat

The input consists of two lines provided via standard input (stdin):

  1. The first line contains a string denoting the day of the week (e.g., Monday, Tuesday, etc.).
  2. The second line contains an integer representing the total price before discount.

outputFormat

Output the final price after applying the discount. The result should be printed to standard output (stdout) as a floating-point number rounded to two decimal places.## sample

Monday
100
90.00