You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'''Given the weekly rental cost of a book X, the number of days you want to rent the book D, and your status as a staff member S (where S="true" if you are a staff member, otherwise S="false"), calculate the total rental cost based on the following rules:
1. The cost to rent the book for up to 7 days is X.
2. If D exceeds 7 days and you are not staff member, an additional charge of 2 Rs per extra day is applied.
3. If you are staff member, no extra charges apply for exceeding 7 days.
4. The full weekly cost X is charged even if you rent the book for less than 7 days.
Write a program to determine the total cost of renting the book.'''
'''Input
The input consists of three lines:
X: An integer representing the weekly rental cost of a book.
D: An integer representing the number of days the book was rented.
S: A string(either "true" or "false") indicating whether the person is a staff member'''