Introduction to Computer Science Assignment

150 views 7:50 am 0 Comments October 17, 2023

Question 1
The Express Delivery Service provides the fastest doorstep collection and delivery within 2-hour in Singapore. The delivery charge is calculated based on the zonal classification in Singapore and there are two main types of zones, one is Central Business District (CBD) with the postal codes starting 01 to 08, 17 to 19, 22 and 23, and other one is NON-CBD for all other areas other than CBD. The postal code in Singapore contains exactly 6 numeric digits. Below mapping table below is used to calculate the delivery charge,

Design an algorithm that will prompt for and receive the postal code for both pickup and delivery location and calculate the delivery charge and print it. The program will then prompt for “Do you want to calculate for another delivery (Yes/No)?” and is to repeat the processing until “No” is entered.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,