read all calculated deductions into Premium due

explain please
how can I get this code to read all calculated deductions into Premium due

#include<iostream>
#include<iomanip>
#include<string>

using namespace std;

int main()
{


double age,GPA,num1,num2,multi_car ;
double P; // P= Premium


P = 1800;
multi_car = 200.00;

string fname,lname,Policy;


cout << " Enter BP for Basic Premium Policy : " << endl;
cin >> Policy;

cout << " Please Enter Driver First Name and Last Name: " << endl;
cin >> fname >> lname;

cout << "Please Enter Drivers Age: " << endl;
cin >> age;

cout << "Enter Drivers GPA : " << endl;
cin >> GPA;

cout << "Enter the number of cars insured : " << endl;
cin >> num1;

cout << "Please enter the number of Driving Volations : " << endl;
cin >> num2;

cout << fixed << showpoint << setprecision(2);

if (age>25)
cout << "Premium Age Reduction after $100.00 deductible is : " << P - 100.00 << endl;


else if(age<25)
cout << " No age Reduction Discount. " <<endl;


if(GPA>=3.0)
cout << " Premium Reduction of $200.00 for good GPA is : " << P -200.00 << endl;


else if(GPA<3.0)
cout << "No GPA Reduction . " <<endl;

if (num1>1)
cout << "Multi Car discount with Premuim policy is : " << P - multi_car<< endl;
else if (num1<1)
cout << " There are no Multi Car Discounts for this customer."<<endl;


if (num2>1)
cout << "The increase for each Traffic Volation is 200.00 ." << endl;
if (num2== 1)
cout << " A 200.00 increase is added." << P + 200.00 <<endl;
if (num2 == 2)
cout << " A 400.00 increase is added." << P + 400.00 <<endl;
else if (num2 == 3)
cout << " A 600.00 increase is added." << P + 600.00 <<endl;


if (num2>3)
cout << " This Policy is cancelled "<< " "<< "Please call customer service. " << endl;


else if (num2<3)
P= P- multi_car;
cout << " Premium Policy Due is: " << P << endl;







system("Pause");
return 0;
1
2
if (age > 25)
		cout << "Premium Age Reduction after $100.00 deductible is : " << P - 100.00 << endl;


You do the output but you never assign P a new value.
Topic archived. No new replies allowed.