Question: Array entry displaying issue in C++ I completed all the work for this assignment, but the entry from user input is not displaying properly like

Array entry displaying issue in C++ I completed all the work for this assignment, but the entry from user input is not displaying properly like the rest of the values already in the array. This is what i was tasked to do first: Add a prompt to ask the user to input their last name (no spaces ; please use underscores if needed), age and a balance of their choice. Create a new entry in the patient_list array with this information

////////////////////////////////////////Code below////////////////////////////////////////////

#include  #include  #include  using namespace std; // Declaring a new struct to store patient data struct patient { int age; char name[20]; float balance; }; 
int main() { int total_patients = 6; // Storing some test data struct patient patient_list[6] = { {25, "Juan Valdez ", 1250}, {15, "James Morris ", 2100}, {32, "Tyra Banks ", 750}, {62, "Mario O'Donell", 375}, {53, "Pablo Picasso ", 615} }; // Prompt user for information cout > patient_list[5].name; cout > patient_list[5].age; cout > patient_list[5].balance; cout  
for (int i = 0; i  
 return 0; } ///////end of code////////////// This is what my output looks like: Array entry displaying issue in C++ I completed all the work for 
 

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!