Q:

Java Program To Find Area Of Isosceles Triangle

0

Java Program To Find Area Of Isosceles Triangle by getting input from the user.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.util.Scanner;
public class demo1
{
   public static void main(String args[]) 
    {          
         Scanner input= new Scanner(System.in);       
         System.out.println("Enter the length of same sided");         
         double a= input.nextDouble();         
         System.out.println("Enter the side2 of the Triangle");         
         double b= input.nextDouble();
         double  area=(b/4)*Math.sqrt((4*a*a)-(b*b));      
         System.out.println("Area of Isosceles Triangle is: " + area);
   }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now