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

Exercise Topic1

The document outlines exercises related to the Program Development Life Cycle, including tasks such as converting weight from kilograms to pounds, determining the smallest and largest of two exam marks, calculating student fees based on credit hours, and distributing oranges among workers. It requires the creation of flowcharts and pseudocode for each task, emphasizing input, process, and output definitions. Additionally, it includes conditions for student status based on credit hours and grading based on average marks with corresponding messages.

Uploaded by

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

Exercise Topic1

The document outlines exercises related to the Program Development Life Cycle, including tasks such as converting weight from kilograms to pounds, determining the smallest and largest of two exam marks, calculating student fees based on credit hours, and distributing oranges among workers. It requires the creation of flowcharts and pseudocode for each task, emphasizing input, process, and output definitions. Additionally, it includes conditions for student status based on credit hours and grading based on average marks with corresponding messages.

Uploaded by

amirdanial703
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EXERCISE CSC126/CSC415

TOPIC 1: Program Development Life Cycle

1. Assume that your weight is 56 kilograms. You need to convert your weight to pound and
display it.

Hint: 1 kg = 2.2 pounds

(a) Define the input, process and output for the task.
(b) Draw the flowchart.
(c) Write the pseudocode.

2. Write a pseudocode that inputs two exam marks and then output both the smallest and the
largest of the two marks.

3. An international college charges RM105.00 for each credit hour taken by its students. The
number of hours that enrolled by a student is 20 hours. You need to calculate the fees that the
student has to pay.

(a) Define the input, process and output for the task.
(b) Draw the flowchart.
(c) Write the pseudocode.

4. Four workers were responsible to pluck oranges. The owner of the orange farm will be given
40% of the oranges. The workers share equally the balance of the oranges. The balance of
oranges after divided will be used to make juice. Draw a complete flowchart and pseudocode
that accepts input for the amount of oranges that were plucked. You are also required to
calculate and print amount of oranges that were received by the owner, each of the workers and
balance of oranges to make juice.

Sample output:
Enter number of oranges plucked : 100
Total oranges for the owner is 40
Total oranges for each worker is 15
Balance of oranges to make juice is 0

***********another output sample**************

Enter number of oranges plucked : 125


Total oranges for the owner is 50
Total oranges for each worker is 18
Balance of oranges to make juice is 3
5. At UiTM, students have to pay RM150 per credit hour taken for each semester. A student must
take at least 12 credit hours to be considered as full time and no students may take more than
21 credit hours. Draw flow chart that input the student’s credit hours taken for the semester
and then output the student status whether full time or part time student and the payment made
by the student for the semester. Make sure to display an error message if the credit hours
entered is negative or greater than 21.

6. Draw flow chart and write a pseudocode that will determine the student’s grade based on the
average mark of a student. The program will read three marks between 0 and 100, calculate
the average mark and display the grade received by the student and the message based on the
table given below. If the user enters number below than 0 and above 100, error message will
be displayed.

Average Mark Grade Message


0 – 49 F You fail the course. Try again next semester
50 – 64 C You pass the course, but more exercises needed.
65 – 74 B You pass the course. Good luck
75 – 100 A Congratulations, you have done a good job.

You might also like