Define a struct employee with 4 members: employeeID(string), name(string), age(int), department(string) Declare an array

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Define a struct employee with 4 members: employeeID(string), name(string), age(int), department(string) Declare an array

Post by answerhappygod »

Define a struct employee with 4 members:
employeeID(string), name(string), age(int),
department(string)
Declare an array of size 5 for your struct
information for each employee from the user. multi-word inputs
for name, department
Display the data in your array in the terminal
Define a function that takes the array as input, and returns
the count of the number of employees where
department == "Computer Science"
Call the above function from your main function, and print the
returned count
C++ please include comments. Linux
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply