Advertisement
Spocoman

08. Circle Area and Perimeter

Dec 8th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function circleAreaAndPerimeter(radius) {
  2.  
  3.     let r = parseFloat(radius[0]);
  4.     console.log((Math.PI * r * r).toFixed(2))
  5.     console.log((2 * Math.PI * r).toFixed(2))
  6.  
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement