قموش الدبة
20-02-2006, 03:46 PM
عندي سؤال و أتمنى حد يحله ..
Write a function to calculate the circumference of a circle. Hint the value of ¼ is provided by JavaScript in the cell named Math.PI (be careful about case, MATH.PI is not the same a Math.PI).
<script>
function circumference(radius){
var v = 2 * Math.PI * radius;
return v;
}
var r = 1;
document.write("circumference ", circumference(1/Math.PI), "<br>");
</script>
سااااااااااااااااااااعدوني ضروري ..
و جزاكم الله خيرا ..
Write a function to calculate the circumference of a circle. Hint the value of ¼ is provided by JavaScript in the cell named Math.PI (be careful about case, MATH.PI is not the same a Math.PI).
<script>
function circumference(radius){
var v = 2 * Math.PI * radius;
return v;
}
var r = 1;
document.write("circumference ", circumference(1/Math.PI), "<br>");
</script>
سااااااااااااااااااااعدوني ضروري ..
و جزاكم الله خيرا ..