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
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
English,
5 months ago
Math,
5 months ago
India Languages,
5 months ago
English,
10 months ago
Science,
10 months ago
English,
1 year ago
Social Sciences,
1 year ago
Biology,
1 year ago