Consider the snippet of code below, then answer the questions that follow: if customerAge>18 then if employment = “Permanent” then if income > 2000 then output “You can apply for a personal loan” endif endif endif Q.2.1.1 If a customer is 19 years old, permanently employed and earns a salary of R6000, what will be the outcome if the snippet of code is executed? Motivate your answer. Q.2.2 Using pseudocode, plan the logic for an application that will prompt the user for two values. These values should be added together. After exiting the loop, the total of the two numbers should be displayed.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
icon
Concept explainers
Question
100%

Consider the snippet of code below, then answer the questions that follow:


if customerAge>18 then
 if employment = “Permanent” then
 if income > 2000 then
 output “You can apply for a personal loan”
 endif
 endif
endif


Q.2.1.1 If a customer is 19 years old, permanently employed and earns a salary 
of R6000, what will be the outcome if the snippet of code is executed? 
Motivate your answer.

Q.2.2 Using pseudocode, plan the logic for an application that will prompt the user for 
two values. These values should be added together. After exiting the loop, the 
total of the two numbers should be displayed.

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning