0% found this document useful (0 votes)
19 views2 pages

Pseudocode and Flowchart Examples

The document contains a series of programming tasks and algorithms related to financial calculations, including interest on shares, rental car pricing, and sales commissions. It includes specific algorithms for computing values based on input conditions and prompts for user input to calculate total savings and commissions. Additionally, it requests the creation of pseudocode and flowcharts for various scenarios involving financial transactions.

Uploaded by

dan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Pseudocode and Flowchart Examples

The document contains a series of programming tasks and algorithms related to financial calculations, including interest on shares, rental car pricing, and sales commissions. It includes specific algorithms for computing values based on input conditions and prompts for user input to calculate total savings and commissions. Additionally, it requests the creation of pseudocode and flowcharts for various scenarios involving financial transactions.

Uploaded by

dan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

QUESTION 16

1. Below is an algorithm that is used to compute the values of R, S and T.


P=5
Q=6
INPUT N
If N is GREATER OR EQUAL TO 10
R = P *Q
S = Q -P
T=P+Q+R+S
ELSE
R=P+Q
S=Q
T=R+S
END IF
PRINT R, S and T
(a) From the algorithm, determine the output if the input value of N is:
(i) 7;
(ii) 10

(b) Draw a flowchart for the algorithm in (a) above.

2. Imara Kabisa Bank(IKB) pays 10% interest in shares exceeding 150,000 shillings and 4% on
shares that do not meet this target. However no interest is paid on deposits in the members
(IKB) bank account.
(a) Design a pseudo code for a program that would

(i) Prompt the user for shares and deposits of a particular member.

(ii) Calculate the interest and total savings

(iii) Display the interest and total savings


(iv) Display the interest and total savings in the screen for a particular member.

3. A car rental firm leases its cars for Ksh.2500.00 per day. The manager giver a discount based on
the number of days that the car is rented. If the rental period is greater than or equals to 7 days
then a 25% discount is given. Write a peudocode to accept a car number and the rental period,
and calculate the total amount earned by the company when a car is leased.
4. Cute Goods Supermarket pays 10% commission on sales that are above 20,000 kshs, and 4%
on any sales that are less than this target. However, no commission is paid on the capital of
the salesman.
(a) Design a pseudo code for a program that would:

(i) Prompt a user for sales and capital of a particular salesman


(ii) Calculate the commission and total amount
(iii) Display the commission and total amount on the screen for a particular
salesman
5. a) Cute Ideas Sacco (CIS) pays 10% interest on shares exceeding ksh100, 000 and 6% on
shares that do not meet this target. However no interest is paid on deposits in the members
CIS account.
a) Design a pseudocode program that would:
(i) Prompt the user for shares and deposits of a particular member
(ii) Calculate the interest on total savings
(iii) Display the interest and total savings on the screen for a particular member of the
society

b) Draw a flow chart for the above pseudocode

You might also like