Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions