On the day of the MPI campus election, the head of the Computer department required all first year students from the AC10, AT20, AT46 and AT47 programs to go to the polls. The student’s matrix number will be recorded for record as proof of student attendance. Once the voting process is completed, the head of the department would like to know the number of students who went to vote according to the program described above. You are required to assist the department head by making analysis and write a program in C++ to solve the above problem. Use the flag type signal variable to solve the above problem. Note: The codes/ numbers that represent each program are as follows:· AC10 - 1· AT20 - 2· AT46 - 3· AT47 -
On the day of the MPI campus election, the head of the Computer department required all first year students from the AC10, AT20, AT46 and AT47 programs to go to the polls. The student’s matrix number will be recorded for record as proof of student attendance. Once the voting process is completed, the head of the department would like to know the number of students who went to vote according to the
Use the flag type signal variable to solve the above problem.
Note: The codes/ numbers that represent each program are as follows:· AC10 - 1· AT20 - 2· AT46 - 3· AT47 - 4
You are required to do the following tasks.
- Analyze the given problem (identify input, process and output).
- Write a complete program in C++ to produce the output as illustrated in Figure B.
Step by step
Solved in 2 steps