circumference of a circle

        
<!Doctype html>
<html>
    <head>
        <title> circumference of a circle</title>
    </head>
    <body>
        <h3> circumference of a circle </h3>
            <form name="f1">
                Enter the radius of the circle:- <input type="number" name="n1" required><br>
                <input type="submit" value="Calculate" onclick="circum()">
                <input type="reset" value="Clear" alt="Clear the search form"><br>
                circumference:- <input type="number" name="n2" readonly>
            </form>
            <script type="text/javascript">
                function circum(){
                event.preventDefault();
                var c,r;
                r = f1.n1.value;
                c = 2*3.14*r;
                f1.n2.value = ""+c;
                }
            </script>
    </body>
</html>
            
        
    


circumference of a circle

Enter the radius of the circle:-

circumference:-


Go back