»
English French Vietnamese

Print - Circumference Calculator - JavaScriptBank.com

Circumference Calculator © JavaScriptBank.comJavaScript can help you figure the circumference of a circle when you enter the radius.

Full version: jsB@nk » Calculation » Math » Circumference Calculator



JavaScript
<SCRIPT LANGUAGE="JavaScript">
// Andrew Jones (andrew.jones@net.ntl.com)
<!-- Begin
function calculate() {
var radius=prompt("Please enter the size of the radius","");
var pi=3.14159265359;  // estimated to 11 decimal places
var circ=2*pi*radius;
var d=alert("The circumference of a circle with radius "+radius+" is "+circ+".")
}
// End -->
</script>
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->


HTML
<input type=button value="   Calculate Circumference   " onClick="calculate()">
	<!--
    	This script downloaded from www.JavaScriptBank.com
    	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
	-->