if(gene1A[20] == 'T' || gene2A[20] == 'T')
outFile << "Person A is of 'Anemic' type." << endl;
else if(gene1A[20] == 'T' && gene2A[20] == 'T')
outFile << "Person A if of 'Carrier' type." << endl;
else
outFile << "Person A is of 'Normal' type." << endl;
if(gene1B[20] == 'T' || gene2B[20] == 'T')
outFile << "Person B is of 'Anemic' type." << endl;
else if(gene1B[20] == 'T' && gene2B[20] == 'T')
outFile << "Person B if of 'Carrier' type." << endl;
else
outFile << "Person B is of 'Normal' type." << endl;
if(gene1C[20] == 'T' || gene2C[20] == 'T')
outFile << "Person C is of 'Anemic' type." << endl;
else if(gene1C[20] == 'T' && gene2C[20] == 'T')
outFile << "Person C if of 'Carrier' type." << endl;
else
outFile << "Person C is of 'Normal' type." << endl;
if(gene1D[20] == 'T' || gene2D[20] == 'T')
outFile << "Person D is of 'Anemic' type." << endl;
else if(gene1A[20] == 'T' && gene2A[20] == 'T')
outFile << "Person D if of 'Carrier' type." << endl;
else
outFile << "Person D is of 'Normal' type." << endl;
is my code as of now. What I need to do is output the the 'outFile' if the Person is Anemic, a Carrier, or normal, based on the array I have set up. Each array is 444 characters long and is either an A, C, T, or O. If a T is in the 20th position of gene1[] and/or gene2[] then the person would be Anemic (if only one array) or a carrier (if in both arrays).
What I have now makes them automatically be "normal". I believe my if statements aren't set up properly, but what I need is to reference the 20th value in an array and then if it == 'T', output their "type".
Note: I noticed in my code i put 20 instead of 19. I made that correction so just look past that.
Thanks guys!
if(&&)before theelse if(||).