Question: c++ Complete the following program with appropriate C++ statements. This program stores the information of 50 Persons using structures. Declare a structure to represent a

c++

c++ Complete the following program with appropriate C++ statements. This program stores

the information of 50 Persons using structures. Declare a structure to represent

a name with two (2) members of type char array with size

Complete the following program with appropriate C++ statements. This program stores the information of 50 Persons using structures. Declare a structure to represent a name with two (2) members of type char array with size 30 named firstname and lastname. Then, create a structure named Person with three (3) members. The members include fullname type Name, age type integer and citizen type integer. Store 50 input data in an array named P of type Person. Print out a list of persons who have age greater than or equal 21 years old. Note: Please write C ++ statements WITHOUT blank spaces unless it is absolutely needed. Example: int num,ab; #include #include using namespace std; 1 2 4 15 16 17 int main() { la) Declare structure named Name with 2 members of type char array named firstname and lastnam with size 30 (3 marks)*/ { 8 9 10 11 j 12 13 14 3 15 }; 11 17 18 /*b) Declare structure named Person with 2 members of type integer named age and citizen, and member of type Name named fullname (4 marks)*/ 19 20 { 21 22 23 24 25 26 27 28 }; 29 30 const int SIZE = 50; 31 32 /*c) Define array named P of type Person with size 50. Note: use the declared SIZE constant (2 33 j 34 35 36 37 I/Get input data cout > j 55 56 57 cout > j 60 } 61 162 63 cout 67 168 cout

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!