Question: #include using namespace std; int main() { string fullName[]; double height[2]; cout getline(cin, fullName[0]); cout cin >> height[0]; cin.ignore(2, ' '); // gets rid of

 #include using namespace std; int main() { string fullName[]; double height[2];

#include

using namespace std;

int main()

{

string fullName[];

double height[2];

cout

getline(cin, fullName[0]);

cout

cin >> height[0];

cin.ignore(2, ' '); // gets rid of in the buffer

cout

getline(cin, fullName[1]);

cout

cin >> height[1];

cin.ignore(2, ' '); // gets rid of in the buffer

cout

}

c++

1) Partially filled arrays Copy-paste your code from warm-up 2 into a new file as a starting point for this problem. Modify your main() function to allow any number of names and heights to be entered instead of just 2). The output should tell you all the people's names entered and their combined height in the same way the previous problem did it for two people). You will need to use a partially filled array to do this. (You can assume that there will not be more than 100 people.) Example (user input is underlined): How many people? 5 Please enter full name: AB Please enter AB's height: 1 Please enter full name: CD Please enter CD's height: 2 Please enter full name: EF Please enter EF's height: 3 Please enter full name: GH Please enter GH's height: 4 Please enter full name: IJ Please enter IJ's height: 5 If AB and CD and EF and GH and IJ stand on top of each other, their combined height will be 15

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!