Write a program to calculate and display the fine charged by a library for not returning the books according to the following rules first 7 days free. Next 7 days 1.50. Next 7 days Rs 3 . Next 7 days Rs 5. Above 28 days Rs 10.
Answers
Answered by
0
Answer:
kjjh
Explanation:
Answered by
0
Answer:
include <iostream> using namespace std; int main() { cout << "Enter number of days: "; int days; cin >> days; cout << endl; double fine; string membership = ""; if(days <= 5) fine = 50; else if(days > 5 && days <= 10) fine = 100; else { fine = 150; if(days > 30) membership = "Your membership was cancelled."; } cout << "Fine: " << fine << " rupees" << endl; cout << membership << endl; cout << endl << endl; return 0; }
hope it's helpful for you
Similar questions