1. Define the following terms:-
1.1Algorithm
1.2Flow Chart
1.3Pseudocode
2. There are several types of flowchart, briefly explain each of them.
3,Give three benefits of flowchart.
4.What is the limitation of flowchart.
5.Write an algorithm (Flowchart and Pseudocode) to input temperature in Fahrenheit and output the corresponding temperature in Centigrade. The formula for conversion is as follows.
C= 5/9 x (F - 32)
6. A student’s letter grade is
calculated according to the following schedule:
Numerical
grade
|
Letter
grade
|
90-100
|
A
|
80-89
|
B
|
70-79
|
C
|
60-69
|
D
|
0-59
|
F
|
Write an algorithm (Flowchart and Pseudocode) that accepts a student’s numerical
grade, converts the numerical grade to an equivalent letter grade, and displays
the letter grade.
7. An electric supply company charges the following rates for its customers:-
No. of unit consumed Charges/unit (RM)
1-200 2.50
201 - 500 3.50
over 501 5.00
No. of unit consumed Charges/unit (RM)
1-200 2.50
201 - 500 3.50
over 501 5.00
If the consumer pays his bill within 15 days from the bill date, 10% discount is given
. If he makes the payment after 15 days from the bill date, 5% surcharge is levied. Draw a flowchart to calculated the net amount of the bill for each consumer and print it.
. If he makes the payment after 15 days from the bill date, 5% surcharge is levied. Draw a flowchart to calculated the net amount of the bill for each consumer and print it.
8. SATU Terengganu charges the following rates for its customer:-
JADUAL PERKIRAAN KOD TARIF BEKALAN AIR
Enakmen PA. 51 Fasal 16 (UPEN.TR.5/115, DUN. TR. 15/25 SK.1)
MULAI 1 MAC 1997
Enakmen PA. 51 Fasal 16 (UPEN.TR.5/115, DUN. TR. 15/25 SK.1)
MULAI 1 MAC 1997
Kod | Jenis Bacaan |
Penggunaan | Caj Minima (RM) |
|
Kuantiti M3 (Meter Padu) |
Caj Setiap M3 |
|||
10 | Rumahtangga | 0 - 20.00 | RM0.42 | RM4.00 sebulan |
20.1 - 40.00 | RM0.65 | |||
40.1 - 60.00 | RM0.90 | |||
60.1 ke atas | RM1.00 | |||
Draw a flowchart to calculated the net amount of the bill for each consumer and print it.
No comments:
Post a Comment