Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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: image text in transcribed 
 

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

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions

Question

to encourage a drive for change by developing new ideas;

Answered: 1 week ago

Question

4 What are the alternatives to the competences approach?

Answered: 1 week ago