{br} STUCK with your assignment? {br} When is it due? {br} Get FREE assistance. Page Title: {title}{br} Page URL: {url}
UK: +44 748 007-0908, USA: +1 917 810-5386 [email protected]

A shipping company maintains a file “Weights.txt” that contains the individual
weights in kg to 1 decimal place of a number of parcels. The maximum parcel
weight allowed is 20 kg. Postage stamps are available in denominations of €3,
€6, €9 and €12. The postage cost in euro for each parcel depends upon its
weight as per the following table ;
0kg – 5kg 3.00
5.1kg – 10kg 6.00
10.1kg – 15kg 9.00
15.1kg – 20kg 12.00

Write a program that
a) reads the contents of the file “Weights.txt” and counts the number of
stamps of each denomination required.
b) displays the number of stamps of each denomination required
c) calculates and displays the total cost of all the stamps.

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?