You are viewing a single comment's thread. Return to all comments →
const PI = Math.PI; const r = parseFloat(readLine());
let area = PI * r * r console.log(area)
let perimeter = 2 * PI * r console.log(perimeter)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Let and Const
You are viewing a single comment's thread. Return to all comments →
const PI = Math.PI; const r = parseFloat(readLine());
let area = PI * r * r console.log(area)
let perimeter = 2 * PI * r console.log(perimeter)