JS Bin // source https://jsbin.com/jidodew

Home   »   JS Bin // source https://jsbin.com/jidodew




  
  
  JS Bin








function calculateCircleCircumference(radius) {
    return 2 * 3.14 * radius;
}

function calculateCircleArea(radius) {
    return 3.14 * (radius * radius);
}

const radiusSize = prompt('Enter the size of radius');

function printCircleData(radiusSize) {
    var circumference = calculateCircleCircumference(radiusSize);
    var area = calculateCircleArea(radiusSize);
	
    console.log('The circumference of the circle is ' + circumference + ' centimeters.');
    console.log('The area of the circle is ' + area + ' square centimeters.');
}

console.log(radiusSize);

printCircleData(radiusSize);

Leave a Reply

Your email address will not be published. Required fields are marked *