Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gopesh Neptune998

🎯
Focusing
View GitHub Profile
View area_perimeter_circle.js
function main() {
// Write your code here. Read input using 'readLine()' and print output using 'console.log()'.
const PI = Math.PI;
var s = readLine();
// Print the area of the circle:
console.log(PI*parseFloat(s)*parseFloat(s));
// Print the perimeter of the circle:
console.log(2*PI*parseFloat(s));
View factorial.js
function factorial(n){
if(n===0){
return 1;
}
else{
return n* factorial(n-1);
}
}
View reverse_string.js
function reverseString(s) {
try{
console.log(s.split('').reverse().join(''));
}
catch(e){
console.log(e.message);
console.log(s);
}
}
View Code.py
def fun():
return "Hello"
fun()