The for loop is useful when we want to execute the same statement for a large number of times. Let us assume that we want to covert degree fahrenheit into degree celcius.
The formula for cooverting degree celcius into degree fahrenheit is
C = 5 * (F-32)/9
Let us assume that we want to calculate and print the value of the degree Celcius for values of degree fahrenheit from 31 to 40. We can do it as shown in the example below.
http://www.referencedesigner.com/tutorials/js/js_10.php
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment