import java.awt.*;
import java.applet.Applet;

public class TMD extends Applet {
    public void paint(Graphics t) {
        drawTriangle(t,80,200,100,110);
        drawTriangle(t,125,220,60,70);
        }

        private void drawTriangle(Graphics t,int bottomX, int bottomY, int base, int height) {
        t.drawLine(bottomX, bottomY, bottomX+base, bottomY);
        t.drawLine(bottomX+base, bottomY, bottomX+base/2, bottomY-height);
        t.drawLine(bottomX+base/2, bottomY-height, bottomX, bottomY);
        }
}

