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

x.Hmign and implement a program to explore life expectancy data stored in a file

ID: 3617616 • Letter: X

Question

x.Hmign and implement a program to explore life expectancy data stored in a file (data.txt).

Explanation / Answer

x.Xlor="red">please rate - thanks #include #include using namespace std; struct life_exp { string name; int year; double both; double male; double female; } life[500],temp; int menu(); int main() { ifstream in; ofstream out; char filename[30]; string key; int low,max,mid; int i,j,count,choice; bool input=false,found,sorted=false; for(;;)    {choice=menu();     switch(choice)     {case 1:coutfilename;             in.open(filename);             if(in.fail())                           {coutlife[count].male;                     in>>life[count].female;                     count++;                    in>>life[count].name;                    }                    cout