Acre
- The acre is unit of land area used in the imperial and US customary systems.
- The international symbol of the acre is ac. The most commonly used acre today is the international acre.
- One acre equals 0.0015625 square miles, 4,840 square yards, 43,560 square feet.
- 1 acre (both variants) is equal to the following customary units:
Hectares
- The hectare is an SI accepted metric system unit of area equal to 100 ares (10,000 m2) or 1 square hectometre (hm2) and primarily used in the measurement of land as a metric replacement for the imperial acre.
Write a program that converts acres to hectares and vice-versa.
Program:
import java.util.Scanner;
class hectares{
public static void main(String ag[]){
Scanner sc=new Scanner(System.in);
float h,a,m,n;
System.out.println("Enter the Acres");
a=sc.nextFloat();
m=a/2.41f;
System.out.println("The Hectares is "+m);
System.out.println("Enter the Hectares");
h=sc.nextFloat();
n=h*2.41f;
System.out.println("The Acres is "+n);
}
}
No comments:
Post a Comment