You are on page 1of 1

Course Code: IAS1123/ IXS 1124

Course Name: Programming Methodology


Class Exercise 1

Topic: Sequence Control Structure


Instruction
Create the defining diagram and pseudo code for the following questions. Based on pseudocode,
create desk checking table for the following data set given.

1. Jenny Nak Tapau (JNT) Enterprise is a company which helps customers deliver their food
order. They need a program to calculate the delivery charge for food pack. The charge is
based on distance in kilometer from the shop which entered by the user and number of food
pack. The delivery rate is fixed which is RM0.60 per kilometer. The charge of food pack is
RM0.50 per pack. Then the program will display the charges need to be pay by the customer.
Data set
Set-1 Set-2
Distance_km 30 40
FoodPax_No 3 5

2. Write a program that converts a given temperature from Celsius to Fahrenheit. The program
should take the temperature in Celsius as input from the user and display the equivalent
temperature in Fahrenheit as output.
Formula :
°F = (°C * 9/5) + 32
Data set
Set-1 Set-2
100 0

3. DaHantarLa (DHL) Enterprise is a company which helps customers deliver their parcels. The company
will charge for their services based on parcel weight and shipping charge. Standard charge for shipping
is RM6 per kilogram. Write a program to calculate the total amount to be charged. The program will
receive the data from the user, which is the parcel’s weight in gram. Then, the program will convert
the weight into kilograms and then calculate the amount to be charged to the customer.
Data set
Set-1 Set-2
500.5 2500

You might also like