(main) Base altura y area de un triangulo

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package protriangulo; /** * * @author Yaritza Miranda */ public class Protriangulo { /** * @param args the command line arguments */ public static void main(String[] args) { Triangulo t = new Triangulo(); t.setBase(80); t.setAltura(15); System.out.println("La base es " + t.getBase()); System.out.println("La altura es " + t.getAltura()); System.out.println("El area es " + t.area()); System.out.println(t.toString()); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.