- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise12.java
More file actions
Latest commit
12 lines (10 loc) · 477 Bytes
/
Copy pathExercise12.java
File metadata and controls
12 lines (10 loc) · 477 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
publicclassExercise12 {
publicstaticvoidmain(Stringarg[]) {
// Write a program that computes the area of a hexagon, where the length
// of the side is input by the user. The formula is:
// six times the square of the side length, divided by 4*K,
// where K is equal to tan(pi/6).
// Hint: The Math library has a function for computing tan(x), i.e. tangent.
// Add your code here, then click "run" to test it.
}
}