Respuesta :

Answer:

The code is shown below.

Explanation:

Consider the provide information.

We need to find the perimeter of the triangle.

The perimeter of the triangle is the sum of all sides.

So the perimeter should be: 10 cm + 14 cm + 15 cm =  39 cm

Now we will write a Java program to find the perimeter.

public class MyClass {

   public static void main(String args[]) {

     int x=10;

     int y=14;

     int z=15;

     int A=x+y+z;

     System.out.println("The perimeter of the triangle is 10 cm + 14 cm + 15 cm = " + A+" cm");

   }

}

Execute the program and you will get a result like this:

The perimeter of the triangle is 10 cm + 14 cm + 15 cm = 39 cm

Refer to the image for better understanding.

Ver imagen FelisFelis