We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53ce6c0 commit 9ab71ecCopy full SHA for 9ab71ec
Programming-Challenges/Fundamentals/src/com/challenges/LandCalculation.java
@@ -0,0 +1,20 @@
1
+/*
2
+One acre of land is equivalent to 43,560 square feet.
3
+Write a program that calculates the number of acres in a tract of land with 389,767 square feet.
4
+Hint: Divide the size of the tract of land by the size of an acre to get the number of acres.
5
+ */
6
+
7
+package com.challenges;
8
9
+public class LandCalculation {
10
+ public static void main(String [] args) {
11
12
+ // Declare Variables
13
+ final double oneAcre = 43560; // square feer
14
+ double givenSize = 389767; // in square feet
15
+ double numberOfAcres;
16
17
+ numberOfAcres = givenSize / oneAcre;
18
+ System.out.print(numberOfAcres + " acres");
19
+ }
20
+}
0 commit comments