Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the pseudocode for the selection structure (if - else) for the following scenario and display relevant messages which indicate the outcome of the selection
Write the pseudocode for the selection structure (if - else) for the following scenario and display relevant messages which indicate the outcome of the selection structure: The selection structure will determine if a person can vote in the elections or not. A message must be displayed indicating if a person can vote. The person must: - Have a valid ID number. - Live in South Africa. - 18 years or older. Use the following variables in the selection structure. Only write the selection structure. You do not need to declare or input values into the variables for this question. - ID number - will be either "yes" or "no". - SA Residence - will be either "yes" or "no". - Age - will be the person's age (e.g., 23). Q.2.4 Write the pseudocode snippet to declare and initialise the following array: (5) MonthlySalary \begin{tabular}{|l|l|l|l|l|} \hline 8000 & 7500 & 12000 & 7800 & 5000 \\ \hline \end{tabular} Q.2.5 In your own words, explain a Boolean expression, a Boolean operator and a (12) Boolean data type. Give an example for each
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started