#include void main () { int age[15]={35,36,37,38,39,40,41,42,43,44,45,46,47,48,49}; //arrays for age-specific risks double riskval[15]={.0025,.0035,.004,.006,.007,.009,.012,.015,.02,.025,.032,.04,.016,.016,.016}; cout<<"Answer the following questions as accurately as possible to determine your D.S. risk."; cout<<"What is your age (round off)?"; int subage; cin>> subage; int n=0; double risk= .005; //if you are under 30, program match this with age while (n<15) //loop that matches(?) age values with risk values {if (subage==age[n]) {risk=riskval[n]; break;} n++;} cout<<"Do you have a parental history of D.S.? 1 is yes. 2 is no. 3 is don't know."; int history; cin>>history; char yn; double recurrrisk=0; double historyrisk=0; if (history==1) { //block of questions that cycle through cout<<"Is it standard trisomy 21? (y/n)" ; cin>> yn; if (yn=='y'||yn=='Y') { historyrisk= .0025; } else { cout<<"Is it mosaicism? (y/n)"; cin>> yn; if (yn=='y'||yn=='Y') { historyrisk= .003; } else { cout<<"Is it Robertsonian translocation? (y/n)"; cin>>yn; if (yn=='y'||yn=='Y'){ historyrisk= .0025; } else { cout<<"Is it non-Robertsonian translocation? (y/n)"; if (yn=='y'||yn=='Y'){ historyrisk= .0000001; }}}} } cout<<"Is this your 1st child? 1 is yes. 2 is no"; int child; cin>>child; if (child==1) { cout<<"this is your risk:\t" <>previous; if (previous==1) { //cycle through block again cout<<"Is it standard trisomy 21 or mosaicism or rare forms? (y/n)" ; cin>> yn; if (yn=='y'||yn=='Y') { recurrrisk= risk+.001;} //supposed to be reccurence risk else { cout<<"Is it de novo Robertsonian translocation? (y/n)"; cin>>yn; if (yn=='y'||yn=='Y'){ recurrrisk=.001; } //value for recurrence risk else { cout<<"Is it familial Robertsonian translocation?(y/n)"; cin>>yn; if (yn=='y'||yn=='Y'){ recurrrisk= .25; } else { cout<<"Is it non-Robertsonian translocation? (y/n)"; cin>>yn; if (yn=='y'||yn=='Y'){ recurrrisk= .0000001; }}}} } double finalrisk= (risk+historyrisk-risk*historyrisk)+recurrrisk-(risk+historyrisk-risk*historyrisk)*recurrrisk ; //probabililty equation here cout<<"this is your final risk" << finalrisk; } }