Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Harrison Group Life Insurance company computes annual policy premiums based

ID: 3589506 • Letter: T

Question

The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer turns in the current calendar year. The premium is computed by taking the decade of the customer’s age, adding 15 to it, and multiplying by 20. For example, a 34 year old would pay $360, which is calculated by adding the decades (3) to 15, and then multiplying by 20. Write an application that prompts a user for the current year and a birth year. Pass both to a method that calculates and returns the premium amount, and then display the returned amount.

Explanation / Answer

#include <iostream>
#include <iomanip>
using namespace std;
int getPremiumAmount(int cYear, int bYear) {
int decade = (cYear - bYear)/10;
int add15 = decade + 15;
return add15 * 20;
}
int main()
{
int currYear , birthYear;
cout<<"Enter the current Year: "<<endl;
cin >> currYear;
cout<<"Enter the birth Year: "<<endl;
cin >> birthYear;
cout<<"Premium Amount is $"<<getPremiumAmount(currYear , birthYear)<<endl;
return 0;
}

Output:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote