Skip to content

Instantly share code, notes, and snippets.

@kryvoboker
Created May 4, 2020 11:42
Show Gist options
  • Save kryvoboker/5ef7ce0ed929bda58a96ab95c91835dc to your computer and use it in GitHub Desktop.
Save kryvoboker/5ef7ce0ed929bda58a96ab95c91835dc to your computer and use it in GitHub Desktop.
HomeWork2
public class AreaOfTriangle {
public void AreaOfTriangle() {
double a = 33.4;
double b = 25.8;
double c = 13.6;
double perimeter = 0.5*(a + b + c);
double area = Math.sqrt(perimeter*(perimeter-a)*(perimeter-b)*(perimeter-c));
System.out.println("Area of a Triangle: " + area);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment