Back

The area of an equilateral triangle is ¼(√3a2) where "a" represents a side of the triangle. You are provided with the side "a". Find the area of the equilateral triangle.

Created 3 years ago
1105 Views
6 Comments
srikanthreddy
@srikanthreddy
srikanthreddy
@srikanthreddyProfile is locked. Login

my code is

// Getting input via STDIN

const readline = require("readline");

const inp = readline.createInterface({

input: process.stdin

});

const userInput = [];

inp.on("line", (data) => {

userInput.push(data);

});

inp.on("close", () => {

var data=userInput[0]

var data1=((0.43301)*(data*data))//start-here

//Your code goes here … replace the below line with your code logic

console.log(data1.toFixed(2));

//end-here

});


Private Testcase #2
Testcase Status:
>>> error
Input:
99
Expected Output:
4243.96
Actual Output:
4243.93

Private Testcase #1
Testcase Status:
>>> error
Input:
20
Expected Output:
173.21
Actual Output:
173.20
Comments (6)
Please login to comment.