CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <string>
using namespace std;
bool runAgain(void);
struct Person {
string firstName;
string middleName;
string lastName;
string age;
string gender;
};
void printPerson(Person arg); // have to use this function implementation
void capitalize(Person arg);
int main(void) {
Person user[4];
do {///get user input
for (int i = 0; i < 1; i++) {
cout << "Please enter your first name: ";
getline(cin, user[i].firstName);
cout << "Please enter your middle name: ";
getline(cin, user[i].middleName);
cout << "Please enter your last name: ";
getline(cin, user[i].lastName);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run