Java program to calculate land price with land area

Java program to calculate land price with land area. They offer cheap independent home layouts, apartments, and private villas. The management of Thilagar Real Estate intends to offer a significant discount to its customers. The discount is calculated based on the amount of land that has been reserved or purchased. Write a Java programme to determine the total price the buyer must pay, taking into account any discounts that may be available.

import java.util.Scanner;
public class Main {
public static void main(String[] args)
Scanner sc = new Scanner(;
double total =0;
System.out.println("Enter the land buyer name");
String name =sc.nextLine();
System.out.println("Enter the lands size in acres");
int area = sc.nextInt();
if(area>=400 && area<=599){
total = area*1700;
total = total * 0.95;
else if(area>=600 && area<=999){
total = area*1900;
total = total * 0.95;
else if(area>=1000 && area<=2600){
total = area*2600;
total = total * 0.96;
else if(area>=2500 && area<=3000){
total = area*2800;
total = total * 0.97;
System.out.println(area+" is out of range");
System.out.println("Total amount after discount is \n"+total);



Enter the land buyer name
Enter the lands size in acres
Total amount after discount is