Question: I need help finishing this. Show the output Please #include #include using namespace std; struct people { string name; float feet; float inch; }; int

I need help finishing this. Show the output Please

#include #include using namespace std; struct people { string name; float feet; float inch;

};

int main() { int const SIZE = 100; people p[SIZE]; int groupSize; double tallest; double smallest; int tallindex, smallindex; int i = 0;

cout << "How large is your group? 100 is the limit: "; cin >> groupSize;

while (i> p[i].name; cout << "Input their height in feet " << endl; cin >> p[i].feet; cout << "Input their height in inch " << endl; cin >> p[i].inch; i++; } tallest = p[i].feet; smallest = p[i].feet;

for (int i = 0; i < groupSize; i++) { if (tallest < p[i].feet) {

tallest = p[i].feet; tallindex = i; }

if (smallest > p[i].feet) { smallest = p[i].feet; smallindex = i; } } cout << " The tallest person is " << p[tallindex].name << " at " << p[i].feet << " feet " << p[i].inch << " inches."<< endl; cout << " The smallest person is " << p[smallindex].name << " at " << p[i].feet << " feet " << p[i].inch << " inches." << endl;

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!