I am working on if statement insurace policy. When i use debugging the if statement only just ask me what gender are you? I enter the answer and then it gave me all the answer to the if statement when all the questions havent been answer. Can anybody give me clues or suggestions of how to fix my if statement problems. Here is the if statement below.
//Stafford Lewis
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double Female, Male;
int age;
double policyrate;
cout<<"Enter your gender (Female or Male):"<<endl;
cin>> Male,Female;
cout<<"Male,Female "<<Male,Female<<endl;
cout<<"Enter your age:"<<endl;
cin>> age;
cout<<"age "<<age<<endl;
if(gender='Male')
if (age<21)
policyrate= 0.05;
else
policyrate= 0.035;
else if (gender='Female')
if (age<21)
policyrate= 0.04;
else
policyrate= 0.03;
return 0;
}