Q:

Java Program To Find Area Of Equilateral Triangle

0

Program To Find Area Of Equilateral 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 side of the Triangle:");
          double a= input.nextDouble();
          double  area=(Math.sqrt(3)/4)*(a*a);
          System.out.println("Area of 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