Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Arrays An array is basically of collection of related variables of the same type. For example, a collection of grades of students, a collection

image text in transcribedimage text in transcribed

1. Arrays An array is basically of collection of related variables of the same type. For example, a collection of grades of students, a collection of salary of employees of a company, etc. The following program allows the user to enter the height in inches of 12 students in a class and display their results. 1 #include using namespace std; int main() { const int SIZE=12; //12 students int sum_height=0; //variable for sum of heights int height [SIZE]; //array to store height of 12 students int above average [SIZE]; //store all above average heights in this array double average; //variable for average of heights for (int i=0;i>height[i]:// read heights, one student at a time // compute sum of heights } //compute average of heights //in a loop check if height is above average //copy to above average array if it is cout

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago