calcul the area of a circle

Write a program that calculates the area of a circle with a radius = 5. Use an approximate value of pi: pi = 3.14 Print the result to the console as shown below. Expected result: Area: 78.5

الحل

الحل 1

const  pi = 3.14;
const radius = 5;
let area = pi*(radius*radius);
console.log("Area: ",area);