Day 1: Let and Const

function main() {
    let r = readLine();
    const PI = Math.PI;
    // Print the area of the circle:
    let area;
    area = PI * r * r
    console.log(area);
    // Print the perimeter of the circle:
    let perimeter;
    perimeter = 2 * PI * r;
    console.log(perimeter);

 

posted @ 2019-07-20 11:38  乱世有歌舞  阅读(82)  评论(0编辑  收藏  举报