make me a script of explanation on how this function and the code itself.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 3PP
icon
Related questions
Question

on this photos, it is my source code program in Dev C ++. Just please make me a script of explanation on how this function and the code itself.

thankyou

1 #include<iostream>
2 using namespace std;
3 struct senior citizen
4-{
5
6
7
8
9
10
11
12} s[3];
13 int main()
14- 0
15
16
17
18
19-
222497298mmmmm
20
21
23
25
26
30
31
32
33
34
35
36
37
38
int number;
char firstname [50];
char middlename [50];
char lastname [50];
string address;
int age;
string healthstatus;
39
40
cout << "Enter information of senior citizens: "
// storing information
for (int i = 0; i < 3; ++i)
{
s[i].number = 1+1;
cout << " Sno: <<
s[i].number<< endl;
cout << "Enter first name:
cin >>s[i].firstname;
cout << "Enter Middle Name:
cin >> s[i].middlename;
cout << "Enter Last name:
cins[i].lastname;
cout << "Enter address:
cin >>s[i].address;
cout<<"Enter age:";
cin>> s[i].age;
cout <<"Enter health status:
cin>> s[i].healthstatus;
<< endl;
Transcribed Image Text:1 #include<iostream> 2 using namespace std; 3 struct senior citizen 4-{ 5 6 7 8 9 10 11 12} s[3]; 13 int main() 14- 0 15 16 17 18 19- 222497298mmmmm 20 21 23 25 26 30 31 32 33 34 35 36 37 38 int number; char firstname [50]; char middlename [50]; char lastname [50]; string address; int age; string healthstatus; 39 40 cout << "Enter information of senior citizens: " // storing information for (int i = 0; i < 3; ++i) { s[i].number = 1+1; cout << " Sno: << s[i].number<< endl; cout << "Enter first name: cin >>s[i].firstname; cout << "Enter Middle Name: cin >> s[i].middlename; cout << "Enter Last name: cins[i].lastname; cout << "Enter address: cin >>s[i].address; cout<<"Enter age:"; cin>> s[i].age; cout <<"Enter health status: cin>> s[i].healthstatus; << endl;
36
37
38
39
40
41
42
43
44
45
46
47-
48
49
50
51
52
53
54
55
56
57
58}
cout<<"Enter age:";
cin>> s[i].age;
}
cout<<"Enter health status:
cin>> s[i].healthstatus;
cout << endl;
}
cout << "Displaying Information: << endl;
// Displaying information
for (int i = 0; i < 3; ++i)
{
cout << "\nSno: << 1+1 << endl;
cout << "First Name:
cout << "Middle Name:
cout << "last Name:
cout << "Address:
cout << Age: <<s[i].age <<endl;
cout << " Health status: <<s[i].healthstatus <<endl;
return 0;
<<s[i].firstname << endl;
<< s[i].middlename << endl;
<<s[i].lastname << endl;
<<s[i].address << endl;
"1
Transcribed Image Text:36 37 38 39 40 41 42 43 44 45 46 47- 48 49 50 51 52 53 54 55 56 57 58} cout<<"Enter age:"; cin>> s[i].age; } cout<<"Enter health status: cin>> s[i].healthstatus; cout << endl; } cout << "Displaying Information: << endl; // Displaying information for (int i = 0; i < 3; ++i) { cout << "\nSno: << 1+1 << endl; cout << "First Name: cout << "Middle Name: cout << "last Name: cout << "Address: cout << Age: <<s[i].age <<endl; cout << " Health status: <<s[i].healthstatus <<endl; return 0; <<s[i].firstname << endl; << s[i].middlename << endl; <<s[i].lastname << endl; <<s[i].address << endl; "1
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT