Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Day04C {
- public static void main(String[] args) {
- double base = 13;
- double height = 10;
- double area;
- area = (base * height) / 2;
- System.out.println("the area of a triangle with ");
- System.out.println("a base of " + base);
- System.out.println("and a height of " + height);
- System.out.println("is " + area);
- double lenght;
- double width;
- double perimeter;
- // make a formula to get the perimiter of a rectangle
- System.out.println("the perimeter of a rectangle with ");
- System.out.println("a length of " + lenght);
- System.out.println("and a width of " + width);
- System.out.println("is " + perimeter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment