Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started