A courier service provides a speed service for any letter/ parcel to new york which delivers on the
same day as per the rate given below: Write an algorithm/program to input the parcel weight in
grams and calculate and print the total charge for a parcel.
Up to 100 gms: Rs. 80
For each additional 100 gm or part thereof Rs. 40
Eg., sample input : 320 gm.
Charge : up to 100 gms =Rs.80
For next 200 gms = Rs. 80
For 20 gms = Rs.40
Total charge = Rs.200

1
kk i am writing
k.
thats it ??
i think so :: first the program looks for an input . if the input is less than or equal to 100 it print the cost as 80 . if the cost is graeter than 100 it prints the answer as 40
thx

Answers

The Brainliest Answer!
2016-01-07T13:54:44+05:30
         class courier { public static void main(String[] args) {
         int input;
         char grade;
          if (input <= 100) {
            price = '80'; }
          else if (input > 100) {
            price = '40'; }
          else { price = 'Error'; }
         System.out.println("Price = " + price); } }
2 5 2