Write the equivalent case structure from the following selection structure. if salaryCode = 1 then output "You earn less

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write the equivalent case structure from the following selection structure. if salaryCode = 1 then output "You earn less

Post by answerhappygod »

Write The Equivalent Case Structure From The Following Selection Structure If Salarycode 1 Then Output You Earn Less 1
Write The Equivalent Case Structure From The Following Selection Structure If Salarycode 1 Then Output You Earn Less 1 (32.52 KiB) Viewed 63 times
Write The Equivalent Case Structure From The Following Selection Structure If Salarycode 1 Then Output You Earn Less 2
Write The Equivalent Case Structure From The Following Selection Structure If Salarycode 1 Then Output You Earn Less 2 (52.84 KiB) Viewed 63 times
Write The Equivalent Case Structure From The Following Selection Structure If Salarycode 1 Then Output You Earn Less 3
Write The Equivalent Case Structure From The Following Selection Structure If Salarycode 1 Then Output You Earn Less 3 (77.05 KiB) Viewed 63 times
Write the equivalent case structure from the following selection structure. if salaryCode = 1 then output "You earn less than R100 000" else if salaryCode = 2 then output "You earn more than R100 000 but less than R250 000" else if salaryCode = 3 then output "You earn more than R250 000 but less than R500 000" endif else output "You earn more than R500 000" endif endif Identify at least two errors in this code snippet and explain why they are wrong. Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 value = 1 sum = 0 while value < 5 sum = sum +value while sum < 50 input values endwhile output sum endwhile
Q.2.4 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 Independent Institute of Education (Pty) Ltd 2022 22; 23 The selection structure will determine if a person qualifies for a SASSA pension grant or not. The criteria listed below is not the official list of government requirements. A message must be displayed indicating if a person qualifies for the SASSA pension or not. The person must: ● be a South African citizen live in South Africa be 60 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. ● Citizenship - will be either "yes" or "no" Residence- will be either "yes" or "no" Age - will be the person's age (e.g., 67) (5) Page 5 of 7 2022
Question 3 Q.3.1 Write the pseudocode for an application that will implement the requirements below. 22; 23 ● Q.3.2 . The Independent Institute of Education (Pty) Ltd 2022 ● Declare a numeric array called 'numbers' that has five elements. Populate the array by asking the user to input values. Use a loop. Ensure the user only enters five numbers. Ask a user whether they would like to search for a particular value. If their answer is yes, the application should allow them to enter a search value and the array must be searched for that value. (Marks: 30) Depending on if the value is found or not, an appropriate message must be displayed. Calculate and display the sum of the elements of the array. Calculate and display the average of the values in the array. Draw the flowchart for an application that will request the user to enter the radius of a circle. The radius of a circle is the distance between the centre of the circle and the edge of the circle (indicated by the red line in the diagram below). Calculate and display the area of the circle. The formula for calculating the area of a circle is: OÃ radius -area A = π xr² The calculation can also be written as: A = 3.14 x (rxr) A = area r = radius π = 3.14 (which is called Pl) (25) Page 6 of 7 2022 (5)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply