Answers for "how to measure acres in java"

1

area of circle in java

import java.util.Scanner;
public class AreaOfCircle {
   public static void main(String args[]){
      int radius;
      double area;
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter the radius of the circle ::");
      radius = sc.nextInt();
      area = (radius*radius)*Math.PI;
      System.out.println("Area of the circle is ::"+area);
   }
}
Posted by: Guest on September-02-2020
3

Java program to calculate area of rectangle

import java.util.Scanner;
public class RectangleArea
{
   public static void main(String[] args)
   {
      Scanner sc = new Scanner(System.in);
      System.out.println("Please enter length of rectangle: ");
      double length = sc.nextDouble();
      System.out.println("Please enter width of rectangle: ");
      double width = sc.nextDouble();
      double area = length * width;
      System.out.println("Area of rectangle is: " + area);
      sc.close();
   }
}
Posted by: Guest on November-10-2020

Code answers related to "how to measure acres in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language