Computer Science, asked by snehashis11, 10 months ago

Write a program in Java to find out the charges for sending parcels.For 1st 1kg -Rs 30Thereafter for every 1/2 kg or its fraction-Rs 12​

Answers

Answered by prashantrohilla32
1

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

 Scanner sc=new Scanner(System.in);

 double a,b,c;

 System.out.println("Enter parcel weight");

 a=sc.nextInt();

 b=(a-1);

 c=(b*12)+30;

System.out.println("Parcel sending charges= "+c);

}

}

Explanation:

Attachments:
Similar questions