Day 1: Let and Const
Day 1: Let and Const
+ 0 comments let PI = Math.PI let r = readLine() console.log((PI * Math.pow(r,2))) console.log(2 * PI * r) return 1
+ 0 comments const PI = Math.PI; let r = parseFloat(readLine()); // Print the area of the circle: let area = PI * r * r; console.log(area); // Print the perimeter of the circle: let perimeter = 2 * PI * r; console.log(perimeter);
+ 0 comments const PI = Math.PI; let r = parseFloat(readLine()); // Print the area of the circle: let area = PI * r * r; console.log(area); // Print the perimeter of the circle: let perimeter = 2 * PI * r; console.log(perimeter);
+ 0 comments function main() { // Write your code here. Read input using 'readLine()' and print output using 'console.log()'. const PI = Math.PI; // Math.P****I means (π=Math.PI) let r = readLine(); // Print the area of the circle: console.log(PI * (r2)); //the area of the circle means = πr^2 // Print the perimeter of the circle: console.log(2*PI*r); //the perimeter of the circle means =2πr
+ 0 comments Here are the solution of Day 1: Let and Const | 10 Days of JavaScript – Hacker Rank Solution https://www.chase2learn.com/day-1-let-and-const-10-days-of-javascript-hacker-rank-solution/
Sort 176 Discussions, By:
Please Login in order to post a comment