package pl.krajan.sendbox;

public class MyFirstProgram {

    public static void main(String[] args) {

      hello("Adam");
      hello("User");
      hello("Testy");

      double len = 2;
      double second = 3;
      double third = 7;
        System.out.println("Pole kwadratu o dlugosci " + len + " = " + wzorkwadratu(len));
        System.out.println("Pole ptostokatu o dlugosci " + len + " i szerokosci " + second +" = " + prostokatu(len, second));
        System.out.println("Pierwiastek z liczby " + len + " wynosi " + pierwiastek(len));
        System.out.println("Liczba " + len + " podniesione do potegi " + third + " jest rowna " + potega(len, third));
    }

    private static void hello(String somebody) {
        System.out.println("Witaj " + somebody + "!");
    }
    public static double wzorkwadratu(double l){
        return l*l;
    }
    public static double prostokatu(double a, double b){
        return a*b;
    }
    public static double pierwiastek(double a){
        return Math.sqrt(a);
    }
    public static double potega(double a, double b){
        return Math.pow(a,b);
    }
    public static double trojkata(double a, double b){
        return a*b;
    }
}
@@ -21,16 +21,70 @@
 ndbox;%0A%0A
+import com.sun.org.apache.xpath.internal.SourceTree;%0A%0A
 public c
@@ -240,9 +240,9 @@
 n = 
-2
+9
 ;%0A  
@@ -711,24 +711,244 @@
 n, third));%0A
+        System.out.println(%22Wysokosc trojkata o podstawie %22 + len + %22 jest rowna %22 + wysokosctrojkata(len));%0A        System.out.println(%22Pole trojkata rownobocznego, o boku %22 + len + %22 jest rowne %22 + poletrojkata(len));%0A
     %7D%0A%0A    p
@@ -1097,17 +1097,17 @@
 (double 
-l
+a
 )%7B%0A     
@@ -1120,11 +1120,11 @@
 urn 
-l*l
+a*a
 ;%0A  
@@ -1407,16 +1407,24 @@
  double 
+wysokosc
 trojkata
@@ -1436,39 +1436,155 @@
 le a
-, double b)%7B%0A        return a*b
+)%7B%0A        return ((a*pierwiastek(3))/2);%0A    %7D%0A    public static double poletrojkata(double a)%7B%0A        return (((potega(a, 2)*pierwiastek(3)))/4)
 ;%0A  

add funkcje na pole trojkata rownobocznego