Question: QUESTION 9 Given the following definitions: struct person { double height; double weight; string name; double salary; int age; 1. Write C++ statements to declare

QUESTION 9 Given the following definitions: struct person { double height; double weight; string name; double salary; int age; 1. Write C++ statements to declare an array of 20 persons 2. Write C++ statements to print the name inf the first index location 3. Write C++ statements to print the age of the last person 4. Write C++ statements to print he average salary of all 20 persons 5. Write C++ statements to read the hight, weight, name, salary and age of an individual from a data file called employee.dat and store into a variable of type person call mayhou. Note: Please write all file open and close statements as well as file declaration
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
