Question: Solve using C + + programming language and full code: Question # 2 : Writing a 'structure' declaration ( 4 pts ) a ) Declare
Solve using C programming language and full code:
Question #: Writing a 'structure' declaration pts
a Declare a struct type named Event which will describe an item with the following
details:
Title a string of characters
Date a string of characters in the format YYYYMMDD
Attendees an integer representing the number of attendees
Type an integer where indicates "Workshop" and indicates "Seminar"
isWorkshop Boolean only if the value of Type is "Workshop"
b Declare event as a variable of type Event.
c Write a function to read the first values Title Date, Attendees, and Type into the
member variables of the Event structure. Pass the struct variable as an argument to the
function. The function should prompt the user in the same order as the items are listed in
the struct.
d Extend your program to allow the user to enter multiple events' information, asking
each time if they want to add another event. If the response is no the program stops
collecting new data. Display all the entered event details on the console, ensuring to
show "attendee" in the singular form if Attendees is and "attendees" in plural form if
Attendees is greater than
Enter event title: Workshop on Data Science
Enter date YYYYMMDD:
Enter number of attendees:
Enter type for Workshop, for Seminar:
Event added successfully.
Do you want to enter another event? yesno: yes
Enter event title: Machine Learning Seminar
Enter date YYYYMMDD:
Enter number of attendees:
Enter type for Workshop, for Seminar:
Event added successfully.
Do you want to enter another event? yesno: no
Displaying all events:
Title: Workshop on Data Science, Date: Attendees: Type:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
