Question
What would the required pseudocode look like for the below C++ program? C++ source code: #include #include using namespace std; // Function to get user
What would the required pseudocode look like for the below C++ program?
C++ source code:
#include
#include
using namespace std;
// Function to get user input for personal information
void getUserInput(string& firstName, string & lastName, string& streetAddress, string& city, string& zipCode) {
cout << "Please Enter Your First Name: ";
getline(cin, firstName);
cout << "Please Enter Your Last Name: ";
getline(cin, lastName);
cout << "Please Enter Your Street Address: ";
getline(cin, streetAddress);
cout << "Please Enter Your City's Name: ";
getline(cin, city);
cout << "Please Enter Your ZIP code: ";
getline(cin, zipCode);
}
// Function to display the provided information
void displayPersonalInformation(const string& firstName, const string& lastName, const string& streetAddress, const string& city, const string& zipCode) {
cout << " Personal Information: ";
cout << "--------------------- ";
cout << "First Name: " << firstName << endl;
cout << "Last Name: " << lastName << endl;
cout << "Street Address: " << streetAddress << endl;
cout << "City: " << city << endl;
cout << "ZIP Code: " << zipCode << endl;
}
int main() {
// Variables to store personal information
string firstName, lastName, streetAddress, city, zipCode;
// Get user's input for personal information
getUserInput(firstName, lastName, streetAddress, city, zipCode);
// Display the provided data
displayPersonalInformation(firstName, lastName, streetAddress, city, zipCode);
return 0;
}
Thank you for your help
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started